## 9.3.130 RANGE (X)

Description: | Returns the decimal exponent range in the model representing numbers with the same kind parameter as the argument.
Class: | Inquiry function; Generic
Arguments: | X must be of type integer, real, or complex. It can be scalar or array valued.
Results: | The result is a scalar of type default integer. For an integer argument, the result has the value INT (LOG10 ( HUGE(X) )). For information on the integer model, see Section D.1; on HUGE, see Section 9.3.56. For a real or complex argument, the result has the value INT(MIN (LOG10( HUGE(X) ), -LOG10( TINY(X) ))). For information on the real model, see Section D.2; on TINY, see Section 9.3.157.

Examples

If X is a REAL(4) value, RANGE (X) has the value 37. (HUGE(X) = (1 - 2-24) x 2128 and TINY(X) = 2-126.)

Previous Page Next Page Table of Contents