MACHAR

The MACHAR function determines and returns machine-specific parameters affecting floating-point arithmetic. Information is returned in the form of a structure with the following fields:

Field Name

Description

IBETA

The radix in which numbers are represented. A longword integer.

IT

The number of base-IBETA digits in the floating-point mantissa M. A longword integer.

IRND

A code in the range 0 - 5 giving information on what type of rounding is done and how underflow is handled. A longword integer.

NGRD

The number of " guard digits" used when truncating the product of two mantissas. A longword integer.

MACHEP

The exponent of the smallest power of IBETA that, added to 1.0, gives something different from 1.0. A longword integer.

NEGEP

The exponent of the smallest power of IBETA that, subtracted from 1.0, gives something different from 1.0. A longword integer.

IEXP

The number of bits in the exponent. A longword integer.

MINEXP

The smallest value of IBETA consistent with there being no leading zeros in the mantissa. A longword integer.

MAXEXP

The smallest positive value of IBETA that causes overflow. A longword integer.

EPS

The floating-point number IBETA MACHEP , loosely referred to as the " floating-point precision."

EPSNEG

The floating-point number IBETA NEGEP , which is another way of determining floating-point precision.

XMIN

The floating-point number IBETA MINEXP , generally the smallest usable floating-point value.

XMAX

The largest usable floating-point value, defined as the number (1-EPSNEG)xIBETA MAXEXP ·

MACHAR is based on the routine machar described in section 20.1 of Numerical Recipes in C: The Art of Scientific Computing (Second Edition), published by Cambridge University Press, and is used by permission. See that section for more details on and sample values of the various parameters returned.

Calling Sequence

Result = MACHAR()

Keywords

DOUBLE

The information returned is normally for single-precision floating-point arithmetic. Specify DOUBLE to see double-precision information.

See Also

CHECK_MATH , , and Special Floating-Point Values .