fraction(3f) - [FORTRAN:INTRINSIC:MODEL_COMPONENTS] Fractional part of the model representation
fraction(x) returns the fractional part of the model representation of X.
y = fraction(x)
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 * radix(x)**(-exponent(x)).
Sample program:
program demo_fraction implicit none real :: x x = 178.1387e-4 print *, fraction(x), x * radix(x)**(-exponent(x)) end program demo_fraction
[[Fortran 95]] and later
[[Elemental procedure|Elemental function]]
fraction (3) | March 11, 2021 |