FRACTION
— Fractional part of the model representation ¶Y = FRACTION(X)
FRACTION(X)
returns the fractional part of the model
representation of X
.
Elemental function
X | The type of the argument shall be a REAL . |
The return value is of the same type and kind as the argument.
The fractional part of the model representation of X
is returned;
it is X * REAL(RADIX(X))**(-EXPONENT(X))
.
program test_fraction implicit none real :: x x = 178.1387e-4 print *, fraction(x), x * real(radix(x))**(-exponent(x)) end program test_fraction
Fortran 90 and later