MAXEXPONENT intrinsic function
Standard: F77 F90 F95 F2003 F2008
 Example Program

X : Real;
Result : Scalar Integer of default kind.

This function returns the maximum exponent used in the model for floating-point numbers of the kind of X.

This is an inquiry function, so X need not be defined; indeed, it is permitted to be disassociated, unallocated, or absent.

The model for real type is that it may be zero or a signed fraction between 1 and 1/RADIX(X) consisting of DIGITS(X) digits, multiplied by an exponent RADIX(X)**e with MINEXPONENT(X)eMAXEXPONENT(X).

Note that the parameters of the model for real type are chosen so that it most closely reflects the actual floating-point numbers on the machine, but nearly all machine floating-point systems differ from the model in important respects. For example, in IEEE arithmetic, which is the most common floating-point available on modern hardware, there are additional values that lie outside the model; these are infinities, NaNs (Not-a-Number), and subnormal numbers (subnormal numbers have an exponent less than MINEXPONENT(X) but have less precision than model numbers).

DIGITS intrinsic function, EXPONENT intrinsic function, HUGE intrinsic function, INTEGER type, MINEXPONENT intrinsic function, RADIX intrinsic function, REAL type, TINY intrinsic function