Intel Fortran includes several intrinsic functions that return details about the numeric representation. These are listed in the following table and described fully in the Language Reference.
Name |
Description |
Argument/Function Type |
---|---|---|
DIGITS |
DIGITS(x). Returns number of significant digits for data of the same type as x. |
x: Integer or Real |
EPSILON |
EPSILON(x). Returns the smallest positive number that when added to one produces a number greater than one for data of the same type as x. |
x: Real |
EXPONENT |
EXPONENT(x). Returns the exponent part of the representation of x. |
x: Real |
FRACTION |
FRACTION(x). Returns the fractional part (significand) of the representation of x. |
x: Real |
HUGE |
HUGE(x). Returns largest number that can be represented by data of type x. |
x: Integer or Real |
MAXEXPONENT |
MAXEXPONENT(x). Returns the largest positive decimal exponent for data of the same type as x. |
x: Real |
MINEXPONENT |
MINEXPONENT(x). Returns the largest negative decimal exponent for data of the same type as x. |
x: Real |
NEAREST |
NEAREST(x, s). Returns the nearest different machine representable number to x in the direction of the sign of s. |
x: Real s: Real and not zero |
PRECISION |
PRECISION(x). Returns the number of significant digits for data of the same type as x. |
x: Real or Complex |
RADIX |
RADIX(x). Returns the base for data of the same type as x. |
x: Integer or Real |
RANGE |
RANGE(x). Returns the decimal exponent range for data of the same type as x. |
x: Integer, Real or Complex |
RRSPACING |
RRSPACING(x). Returns the reciprocal of the relative spacing of numbers near x. |
x: Real |
SCALE |
SCALE(x, i). Multiplies x by 2 raised to the power of i. |
x: Real |
SET_EXPONENT |
SET_EXPONENT(x,i). Returns a number whose fractional part is x and whose exponential part is i. |
x: Real |
SPACING |
SPACING(x). Returns the absolute spacing of numbers near x. |
x: Real |
TINY |
TINY(x). Returns smallest positive number that can be represented by data of type x. |
x: Real |