Details of the Predefined Rounding Rules
|
Description
|
|
•
|
The ScientificErrorAnalysis package has predefined rounding rules that are used by the `combine/errors` and ApplyRule functions. To define custom rules, use the AddRule function.
|
•
|
The following rounding rules are predefined in ScientificErrorAnalysis.
|
|
digits
|
|
|
This rule does not round the central value or uncertainty of a quantity-with-error. Use of this rule allows error analysis calculations to proceed at the current setting of Digits.
|
|
The rule digits is the initially defined default rule in ScientificErrorAnalysis. To set the default rule, use the UseRule function.
|
|
|
round[n]
|
|
|
This rule rounds the uncertainty of a quantity-with-error to n significant figures (if present), and rounds the central value to match (if necessary), that is, such that the place value of the least significant figure of the central value is the same as (or less than) that of the uncertainty.
|
>
|
with(ScientificErrorAnalysis):
|
>
|
e1 := Quantity( 1.2088, 0.563 );
|
| (1) |
>
|
ApplyRule( e1, round[2] );
|
| (2) |
|
|
round3g[n]
|
|
|
This rule rounds the uncertainty of a quantity-with-error to n or n+1 significant figures (if present), and rounds the central value to match (if necessary), that is, such that the place value of the least significant figure of the central value is the same as (or less than) that of the uncertainty.
|
|
If the most significant figure of the given uncertainty is three or greater, the uncertainty is rounded to n figures. If the most significant figure is less than three, the uncertainty is rounded to n+1 figures.
|
>
|
e1 := Quantity( 1.2088, 0.563 );
|
| (3) |
>
|
ApplyRule( e1, round3g[1] );
|
| (4) |
>
|
e4 := Quantity( 1.2088, 0.263 );
|
| (5) |
>
|
ApplyRule( e4, round3g[1] );
|
| (6) |
|
|
round_cv
|
|
|
This rule does not modify the uncertainty of a quantity-with-error, but rounds the central value to match, that is, such that the place value of the least significant figure of the central value is the same as (or less than) that of the uncertainty.
|
>
|
e1 := Quantity( 1.2088, 0.563 );
|
| (7) |
>
|
ApplyRule( e1, round_cv );
|
| (8) |
|
|
implicitize
|
|
|
This rule rounds the central value of a quantity-with-error to the significant figures that remain unchanged over the interval of the central value plus or minus the uncertainty. The uncertainty is set to zero. In other words, the central value is rounded to its reliable figures, assuming the usual 68 percent confidence interval and normal distribution.
|
>
|
e1 := Quantity( 1.2088, 0.563 );
|
| (9) |
>
|
ApplyRule( e1, implicitize );
|
| (10) |
|
In the above example, ApplyRule constructed a new Quantity object with zero uncertainty, which automatically simplifies to the central value.
|
|
|
|