Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 6/24/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

FRACTION

Elemental Intrinsic Function (Generic): Returns the fractional part of the model representation of the argument value.

result = FRACTION (x)

x

(Input) Must be of type real.

Results

The result type and kind are the same as x.

The result has the value x* b e. Parameters b and e are defined in Model for Real Data.

If x has the value zero, the result has the value zero.

Example

If 3.0 is a REAL(4) value, FRACTION (3.0) has the value 0.75.

The following shows another example:

REAL result
result = FRACTION(3.0) ! returns 0.75
result = FRACTION(1024.0) ! returns 0.5