Accuracy

Accuracy[x]

gives the effective number of digits to the right of the decimal point in the number x.

Details

Examples

open allclose all

Basic Examples  (3)

Machine-precision number:

Arbitrary-precision number:

Exact number:

Scope  (4)

Accuracy is the effective number of digits known to the right of the decimal point:

A zero known to accuracy 20:

The precision of z+1 is the same as the accuracy of z:

Accuracy of a machine zero:

The uncertainty in 0. equals the uncertainty in the smallest positive normalized machine number:

Specify accuracy as the goal for N:

Generalizations & Extensions  (1)

The accuracy of a symbolic expression is the minimum of the accuracies of its numbers:

Applications  (2)

Check the quality of a result:

Track loss of accuracy in a repetitive calculation:

Properties & Relations  (4)

For normalized machineprecision numbers, Accuracy[x] is the same as $MachinePrecision-Log[10,Abs[x]]:

No machine number has a higher accuracy than $MinMachineNumber:

Real and imaginary parts of complex numbers can have different accuracies:

Arithmetic operations will typically mix them:

But note that real and imaginary parts may still have different accuracies:

The accuracy of the whole number is always less than or equal to either of these two accuracies:

For machine numbers, accuracy generally increases with decreasing magnitude, with a maximum at $MinMachineNumber:

For approximate numbers, Precision[x]==RealExponent[x]+Accuracy[x]:

Possible Issues  (1)

Subnormal machine numbers violate the relationship Precision[x]==RealExponent[x]+Accuracy[x]:

Instead, all subnormal numbers have the same uncertainty as $MinMachineNumber:

Neat Examples  (1)

Accuracy and Precision in iterating the logistic map:

Wolfram Research (1988), Accuracy, Wolfram Language function, https://reference.wolfram.com/language/ref/Accuracy.html (updated 2018).

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_2024_accuracy, author="Wolfram Research", title="{Accuracy}", year="2018", howpublished="\url{https://reference.wolfram.com/language/ref/Accuracy.html}", note=[Accessed: 22-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_accuracy, organization={Wolfram Research}, title={Accuracy}, year={2018}, url={https://reference.wolfram.com/language/ref/Accuracy.html}, note=[Accessed: 22-December-2024 ]}