Machine Arithmetic Constants

SUMMARY:

The object .Machine is a list with various numeric components whose names (with the exception of integer.max ) are made up of the characters double. or single. followed by the name of a particular parameter of machine arithmetic (described below). For example, single.digits is the number of base single.base digits in the floating point representation of a single-precision number. In addition, the component integer.max is the largest integer.

ARGUMENTS:

double.eps
single.eps
The smallest positive floating-point number such that `1+eps != 1'. In particular, if either base == 2 or rounding == 0 , eps is base^ulp.digits . Otherwise, eps is base^upl.digits/2 .
double.neg.eps
single.neg.eps
A small positive floating-point number such that `1-.neg.eps != 1'. In particular, if base == 2 or rounding == 0 , neg.eps is base^neg.ulp.digits . Otherwise, neg.eps is (base^neg.ulp.digits)/2 . Because neg.ulp/digits is bounded below by -(digits+3) , neg.eps may not be the smallest number that can alter 1 by subtraction.
double.xmin
single.xmin
The smallest non-vanishing normalized floating-point power of the radix, i.e., xmin is base^min.exp .
double.xmax
single.xmax
The largest finite floating-point number. In particular xmax is (1-neg.eps)*digits^max.exp . Note - on some machines xmax will be only the second, or perhaps third, largest number, being too small by 1 or 2 units in the last digit of the significand.
double.base
single.base
the base for the floating-point representation.
double.digits
single.digits
The number of significant digits in the given base.
double.rounding
single.rounding
The rounding action: 0 if floating-point addition chops; 1 if floating-point addition rounds, but not in the IEEE style; 2 if floating-point addition rounds in the IEEE style; 3 if floating-point addition chops, and there is partial underflow; 4 if floating-point addition rounds, but not in the IEEE style, and there is partial underflow; 5 if floating-point addition rounds in the IEEE style, and there is partial underflow.
double.guard
single.guard
The number of guard digits for multiplication with truncating arithmetic. It is 0 if floating-point arithmetic rounds, or if it truncates and only digits base base digits participate in the post-normalization shift of the floating-point significand in multiplication; 1 if floating-point arithmetic truncates and more than digits base base digits participate in the post-normalization shift of the floating-point significand in multiplication.
double.ulp.digits
single.ulp.digits
The largest negative integer such that `1+base^ulp.digits != 1', except that ulp.digits is bounded below by -(digits+3) .
double.neg.ulp.digits
single.neg.ulp.digits
The largest negative integer such that `1-base^neg.ulp.digits != 1', except that neg.ulp.digits is bounded below by -(digits+3) .
double.exponent
single.exponent
The number of bits (decimal places if base == 10) reserved for the representation of the exponent (including the bias or sign) of a floating-point number.
double.min.exp
single.min.exp
The largest in magnitude negative integer such that base^min.exp is positive and normalized.
double.max.exp
single.max.exp
The smallest positive power of base that overflows.
integer.max
The largest integer that can be represented.

SOURCE:

Adapted from W. J. Cody, "MACHAR: A Subroutine to Dynamically Determine Machine Parameters," TOMS(14), 1988.

EXAMPLES:

.Machine$integer.max  # largest integer