RRSPACING intrinsic function
Standard: F77 F90 F95 F2003 F2008
 Example Program
<Syntax>

RRSPACING ( X )

X : Real with any kind;

Result : same type and kind as X.

<Semantics>

This function returns the reciprocal of the relative spacing of model numbers with the same kind as X, in the vicinity of X. If X is not a model number (for example, if X is an IEEE subnormal number), RRSPACING is the value for the nearest model number to X; if X is an IEEE infinity or NaN, the result is a NaN.

For a model number X, this is equal to ABS(SET_EXPONENT(X,DIGITS(X))).

Like many intrinsic functions, this is elemental; the result has the same shape as X, with the operation being applied elementwise.

<Related>
DIGITS intrinsic function, RADIX intrinsic function, REAL type, SET_EXPONENT intrinsic function, SPACING intrinsic function.