RANGE

Inquiry Intrinsic Function (Generic): Returns the decimal exponent range in the model representing numbers with the same kind parameter as the argument.

Syntax

result = RANGE (x)

x
(Input) 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 Model for Integer Data.

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 Model for Real Data.

Compatibility

CONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIB

See Also: HUGE, TINY

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)