Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

RANGE

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

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.

Example

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

See Also