Floating-Point Inquiry and Control Procedures: table

Note: Certain functions (EXPONENT, FRACTION, NEAREST, RRSPACING, SCALE, SET_EXPONENT and SPACING) return values related to components of the model set of real numbers. For a description of this model, see the Model for Real Data.

Name Procedure Type Description Argument/Function Type
DIGITS Intrinsic Function DIGITS(x). Returns number of significant digits for data of the same type as x. x: Integer or Real

result: Integer

EPSILON Intrinsic Function 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

result: same type as x

EXPONENT Intrinsic Function EXPONENT(x). Returns the exponent part of the representation of x. x: Real

result: Integer

FRACTION Intrinsic Function FRACTION(x). Returns the fractional part of the representation of x. x: Real

result: same type as x

GETCONTROLFPQQ1 Run-time Subroutine GETCONTROLFPQQ(control). Returns the value of the floating-point processor control word. control: INTEGER(2)
GETSTATUSFPQQ1 Run-time Subroutine GETSTATUSFPQQ(status). Returns the value of the floating-point processor status word. status: INTEGER(2)
HUGE Intrinsic Function HUGE(x). Returns largest number that can be represented by data of type x. x: Integer or Real

result: same type as x

LCWRQQ1 Run-time Subroutine Same as SETCONTROLFPQQ.  
MAXEXPONENT Intrinsic Function MAXEXPONENT(x). Returns the largest positive decimal exponent for data of the same type as x. x: Real

result: INTEGER(4)

MINEXPONENT Intrinsic Function MINEXPONENT(x). Returns the largest negative decimal exponent for data of the same type as x. x: Real

result: INTEGER(4)

NEAREST Intrinsic Function 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

result: same type as x

PRECISION Intrinsic Function PRECISION(x). Returns the number of significant digits for data of the same type as x. x: Real or Complex

result: INTEGER(4)

RADIX Intrinsic Function RADIX(x). Returns the base for data of the same type as x. x: Integer or Real

result: INTEGER(4)

RANGE Intrinsic Function RANGE(x). Returns the decimal exponent range for data of the same type as x. x: Integer, Real or Complex

result: INTEGER(4)

RRSPACING Intrinsic Function RRSPACING(x). Returns the reciprocal of the relative spacing of numbers near x. x: Real

result: same type as x

SCALE Intrinsic Function SCALE(x, i). Multiplies x by 2 raised to the power of i. x: Real

i: Integer

result: same type as x

SCWRQQ1 Run-time Subroutine Same as GETCONTROLFPQQ.  
SETCONTROLFPQQ1 Run-time Subroutine SETCONTROLFPQQ (controlword). Sets the value of the floating-point processor control word. controlword: INTEGER(2)
SET_EXPONENT Intrinsic Function SET_EXPONENT(x, i). Returns a number whose fractional part is x and whose exponential part is i. x: Real

i: Integer

result: same type as x

SPACING Intrinsic Function SPACING(x). Returns the absolute spacing of numbers near x. x: Real

result: same type as x

SSWRQQ1 Run-time Subroutine Same as GETSTATUSFPQQ.  
TINY Intrinsic Function TINY(x). Returns smallest positive number that can be represented by data of type x. x: Real

result: same type as x

1 ia32 only

See also Miscellaneous Run-Time Procedures: table.