fraction(x): Fractional Part in Model Representation

Fractional part of the model representation.

Declaration

Sintaxe

retval = fraction(x)
elemental real(p) function fraction(x)

Argumentos

x the input value, must be real.

Valores de retorno

The returned value has the kind of the input value. The fractional part of the model representation of the input value is returned.

Descrição

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.

Exemplos

program intrinsics_fraction
    implicit none
    real :: x = 3.0
    print *, fraction(x)
end program

Resultado:

0.75

Veja Também