Accuracy[x]
gives the effective number of digits to the right of the decimal point in the number x.
Accuracy
Accuracy[x]
gives the effective number of digits to the right of the decimal point in the number x.
Details
- Accuracy[x] gives a measure of the absolute uncertainty in the value of x.
- With uncertainty dx, Accuracy[x] is -Log[10,dx].
- For exact numbers such as integers, Accuracy[x] is Infinity.
- Accuracy[x] does not normally yield an integer result, and need not be positive.
- For any approximate number x, Accuracy[x] is equal to Precision[x]-RealExponent[x].
- For machine‐precision numbers whose magnitude is at least $MinMachineNumber, Accuracy[x] is given by $MachinePrecision-Log[10,Abs[x]]. »
- Accuracy[0.] equals Accuracy[$MinMachineNumber], as does the accuracy of any machine number smaller in magnitude than $MinMachineNumber. »
- Numbers entered in the form digits``a are taken to have accuracy a.
- If x is not a number, Accuracy[x] gives the minimum value of Accuracy for all the numbers that appear in x. »
Examples
open all close allBasic Examples (3)
Scope (4)
Accuracy is the effective number of digits known to the right of the decimal point:
Accuracy[123456789.987654321]z = 0``20Accuracy[z]The precision of z+1 is the same as the accuracy of z:
1 + zPrecision[%]Accuracy[0.]The uncertainty in 0. equals the uncertainty in the smallest positive normalized machine number:
Accuracy[$MinMachineNumber]Specify accuracy as the goal for N:
N[1 + 1 / GoldenRatio - GoldenRatio, {∞, 30}]Accuracy[%]Generalizations & Extensions (1)
Applications (2)
Properties & Relations (4)
For normalized machine‐precision numbers, Accuracy[x] is the same as $MachinePrecision-Log[10,Abs[x]]:
x = RandomReal[{-1, 1}] 10 ^ RandomInteger[{-300, 300}]Accuracy[x]$MachinePrecision - Log[10, Abs[x]]No machine number has a higher accuracy than $MinMachineNumber:
Accuracy[$MinMachineNumber]Real and imaginary parts of complex numbers can have different accuracies:
3.64``10 + IArithmetic operations will typically mix them:
% ^ 4But note that real and imaginary parts may still have different accuracies:
Accuracy /@ ReIm[%]The accuracy of the whole number is always less than or equal to either of these two accuracies:
Accuracy[%%]For machine numbers, accuracy generally increases with decreasing magnitude, with a maximum at $MinMachineNumber:
Plot[Accuracy[$MinMachineNumber / 2^n], {n, -100, 100}, PlotTheme -> "FrameGrid", FrameLabel -> {n, Accuracy}, PlotLegends -> {HoldForm@($MinMachineNumber/2^n)}]//QuietFor approximate numbers, Precision[x]==RealExponent[x]+Accuracy[x]:
numberTypes = {123456789.987654321, 0``40, 2`21, N[Pi, 18.9], -7, N[Exp[10 + I]]};TableForm[Table[{x, Precision[x], RealExponent[x], Accuracy[x], Precision[x] == RealExponent[x] + Accuracy[x]}, {x, numberTypes}], TableHeadings -> {{}, {"x", "Precision", "RealExponent", "Accuracy", "equality"}}, TableSpacing -> {1, 1}]Possible Issues (1)
Subnormal machine numbers violate the relationship Precision[x]==RealExponent[x]+Accuracy[x]:
x = $MinMachineNumber / 2Precision[x] == RealExponent[x] + Accuracy[x]Instead, all subnormal numbers have the same uncertainty as $MinMachineNumber:
Accuracy[x] == Accuracy[$MinMachineNumber]Tech Notes
Related Guides
Related Links
History
Introduced in 1988 (1.0) | Updated in 2003 (5.0) ▪ 2018 (11.3)
Text
Wolfram Research (1988), Accuracy, Wolfram Language function, https://reference.wolfram.com/language/ref/Accuracy.html (updated 2018).
CMS
Wolfram Language. 1988. "Accuracy." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2018. https://reference.wolfram.com/language/ref/Accuracy.html.
APA
Wolfram Language. (1988). Accuracy. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Accuracy.html
BibTeX
@misc{reference.wolfram_2026_accuracy, author="Wolfram Research", title="{Accuracy}", year="2018", howpublished="\url{https://reference.wolfram.com/language/ref/Accuracy.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_accuracy, organization={Wolfram Research}, title={Accuracy}, year={2018}, url={https://reference.wolfram.com/language/ref/Accuracy.html}, note=[Accessed: 13-June-2026]}