Precision and Accuracy

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:

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:

We can get the precision of the number by using the Mathics3 Built-in function Precision:

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:

The absolute accuracy of a number is set by adding two RawBackquotes `` and the number digits.

For example:

is a number having an absolute uncertainty of $10^-4$.

This number is numerically equivalent to 13.1413``4:

The absolute accuracy for the value 0 is a fixed-precision Real number:

See also Accuracy and precision.

Plotting Introduction Examples
Program-Flow Control Statements