BITMAX

Purpose:

Returns the maximum double precision floating point integer value.

Syntax:

BITMAX("precision")

"precision"

-

Optional, a string, the real number precision.

"single"

:

single precision

"float"

:

single precision

"double"

:

double precision (default)

Returns:

A real, the maximum double precision floating point integer.

Example:

a = bitmax;

b = bitmax("double");

c = bitmax("single");

 

a = 9007199254740991

b = 9007199254740991

c = 16777215

 

Variables a and b contain the maximum integer value that can be uniquely represented by a double precision value.

 

Variable c contains the maximum integer value that can be uniquely represented by a single precision value (float).

Example:

bitmax < realmax

 

returns 1.0.

Remarks:

For double precision, BITMAX is 2^(53) - 1, the integer value when all bits are set.

 

A double precision value can uniquely represent all integers between 0 and BITMAX inclusive.

 

A single precision value can uniquely represent all integers between 0 and BITMAX("single") inclusive.

See Also:

EPS

INF

INTMAX

INTMIN

REALMAX

REALMIN