Lahey/Fujitsu Fortran

FRACTION Function

Description

The Fraction function returns the fractional part of the representation of a REAL number.

Syntax

FRACTION (x)

Arguments

x is an INTENT(IN) scalar or array of type REAL.

Result

The result is of type REAL and the same kind as x. Its value is the fraction part of the physical representation of x.

Example

real :: x.4.3 write(*,*) x.fraction(x) ! writes 4.300000 0.5375000 write(*,*) scale(fraction(x),exponent(x)) ! writes 4.300000

See Also

SET_EXPONENT Function