gives the number of decimal digits of precision used for machine‐precision numbers.
$MachinePrecision
gives the number of decimal digits of precision used for machine‐precision numbers.
Details
- A typical value of $MachinePrecision is 53Log[10,2] or approximately 16.
- $MachinePrecision is the numerical value of MachinePrecision.
Examples
open all close allBasic Examples (1)
Scope (1)
Applications (1)
Make sure computations are carried out with the same precision as machine numbers:
Block[{$MinPrecision = $MachinePrecision, $MaxPrecision = $MachinePrecision}, Exp[1000.] - Exp[1001.]]Without fixing the precision, the resulting precision may be lower:
Exp[1000.] - Exp[1001.]Properties & Relations (3)
$MachinePrecision evaluates to a number while MachinePrecision is a numerical constant:
{$MachinePrecision, MachinePrecision}$MachinePrecision is numerically Equal to MachinePrecision:
$MachinePrecision == MachinePrecision$MachinePrecision is the machine precision approximation to MachinePrecision:
N[{$MachinePrecision, MachinePrecision}]N[{$MachinePrecision, MachinePrecision}, 30]Numbers with just a few digits entered are assumed to have machine precision:
x = 1.23456789Precision is based on the number of digits when more than ⌈$MachinePrecision⌉+1 are entered:
y = 1.234567890123456789{Precision[x], Precision[y]}$MachinePrecision times the number of bits per digit gives the binary machine precision:
$MachinePrecision * Log[2., 10.]Possible Issues (1)
$MachinePrecision uses arbitrary precision computations with machine precision resolution:
ode = {x''[t] + Sin[x[t]] == 0, x[0] == 1, x'[0] == 0};asol = NDSolve[ode, x, {t, 0, 10 ^ 3Pi}, WorkingPrecision -> $MachinePrecision, MaxSteps -> Infinity]//TimingMachinePrecision uses machine number computations:
msol = NDSolve[ode, x, {t, 0, 10 ^ 3Pi}, WorkingPrecision -> MachinePrecision, MaxSteps -> Infinity]//TimingTech Notes
Related Guides
History
Introduced in 1991 (2.0) | Updated in 2003 (5.0)
Text
Wolfram Research (1991), $MachinePrecision, Wolfram Language function, https://reference.wolfram.com/language/ref/$MachinePrecision.html (updated 2003).
CMS
Wolfram Language. 1991. "$MachinePrecision." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2003. https://reference.wolfram.com/language/ref/$MachinePrecision.html.
APA
Wolfram Language. (1991). $MachinePrecision. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/$MachinePrecision.html
BibTeX
@misc{reference.wolfram_2026_$machineprecision, author="Wolfram Research", title="{$MachinePrecision}", year="2003", howpublished="\url{https://reference.wolfram.com/language/ref/$MachinePrecision.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_$machineprecision, organization={Wolfram Research}, title={$MachinePrecision}, year={2003}, url={https://reference.wolfram.com/language/ref/$MachinePrecision.html}, note=[Accessed: 13-June-2026]}