This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
Representation of Numbers
Mathematica handles both integers and real numbers with any number of digits, automatically tagging numerical precision when appropriate. Mathematica internally uses several highly optimized number representations, but nevertheless provides a uniform interface for digit and precision manipulation, while allowing numerical analysts to study representation details when desired.
IntegerDigits digits of an integer in any base
IntegerLength total number of digits in any base
IntegerExponent number of trailing 0s in a given base
BitAnd  ▪ BitXor  ▪ DigitCount  ▪ Mod  ▪ ...
RealDigits digits and exponent of a real number in any base
Precision total number of digits of precision
Accuracy number of significant digits to the right of the decimal point
RealExponent the overall scale of a number
MantissaExponent break a number into mantissa and exponent
FromDigits construct a number from its digits
Testing for Types
NumberQ test whether an expression is a number
IntegerQ test whether an expression is an integer
MachineNumberQ test whether an expression is a machine-precision number
Head find the symbolic head of a number
Integer  ▪ Real  ▪ Rational  ▪ Complex
Internal Representation