Representation of Numbers

The Wolfram Language handles both integers and real numbers with any number of digits, automatically tagging numerical precision when appropriate. The Wolfram Language 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.

ReferenceReference

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

IntegerPart  ▪  FractionalPart  ▪  Floor  ▪  ...

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

ExactNumberQ  ▪  InexactNumberQ

Head find the symbolic head of a number

Integer  ▪  Real  ▪  Rational  ▪  Complex

Internal Representation

$MaxNumber  ▪  $MinNumber  ▪  $MaxPrecision  ▪  $MinPrecision

$MachinePrecision  ▪  $MachineEpsilon  ▪  $MaxMachineNumber  ▪  $MinMachineNumber