Mathics3 handles relative and absolute uncertainty in numerical quantities. The precision or relative accuracy, is set by adding a RawBackquote character (`
) and the number of digits of precision in the mantissa. For example:
3.1416`3
Above, two decimal places are shown in the output after the decimal point, but three places of precision are stored.
The relative uncertainty of 3.1416`3
is 10^-3. It is numerically equivalent, in three places after the decimal point, to 3.1413`4:
3.1416`3 == 3.1413`4
We can get the precision of the number by using the Mathics3 Built-in function Precision
:
Precision[3.1413`4]
While 3.1419 is not the closest approximation to Pi in 4 digits after the decimal point (or with precision 4), for 3 digits of precision it is:
Pi == 3.141987654321`3
The absolute accuracy of a number is set by adding two RawBackquotes ``
and the number digits.
For example:
13.1416``4
is a number having an absolute uncertainty of $10^-4$.
This number is numerically equivalent to 13.1413``4
:
13.1416``4 == 13.1413``4
The absolute accuracy for the value 0 is a fixed-precision Real number:
0``4
See also Accuracy and precision.