fraction(x): Fractional Part in Model Representation¶
Fractional part of the model representation.
Declaración¶
Sintaxis¶
retval = fraction(x)
elemental real(p) function fraction(x)
Argumentos¶
x
the input value, must be real.
Valores devueltos¶
The returned value has the kind of the input value. The fractional part of the model representation of the input value is returned.
Descripción¶
fraction(x) computes the fractional part of the model representation of x.
It is calculated using:
\(x * {radix(x)}^{(-exponent(x))}\)
Tipos¶
Supported argument type is real.
Ejemplos¶
program intrinsics_fraction
implicit none
real :: x = 3.0
print *, fraction(x)
end program
Result:
0.75