Macintosh: Maximum Number of Digits

A customer asks: "What is the largest number of digits that can be
represented in a number on the Macintosh?" The answer depends on what
is meant by "digits."

Binary Digits

The maximum number of binary digits is 63. A number this large can be
achieved with both the comp data type and the extended data type. In
the case of the extended data type, a 15-bit exponent is part of the
number.

Decimal Numbers

The maximum representable number in the extended data type is
2 exponent (16383)*(1.1 recurring 63 times) = 1.1E4932.
This number is 4,933 decimal digits long.

In terms of numbers not represented in a floating point extended data
type, but one of the other data types, then the maximum decimal digit is
2 exponent 63, approximately equalling 9.2E18, which is 19 decimal digits.

For More Information

See the "Apple Numerics Manual: Standard Apple Numeric Environment,"
(copyright 1986, ISBN 0-201-17741-2) page 14.

Note: programming languages may further limit the data types available
to the programmer.


Published Date: Feb 18, 2012