
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 quantitywitherror. 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 quantitywitherror 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 );

${\mathrm{e1}}{\u2254}{\mathrm{Quantity}}{}\left({1.2088}{\,}{0.563}\right)$
 (1) 
>

ApplyRule( e1, round[2] );

${\mathrm{Quantity}}{}\left({1.21}{\,}{0.56}\right)$
 (2) 


round3g[n]



This rule rounds the uncertainty of a quantitywitherror 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 );

${\mathrm{e1}}{\u2254}{\mathrm{Quantity}}{}\left({1.2088}{\,}{0.563}\right)$
 (3) 
>

ApplyRule( e1, round3g[1] );

${\mathrm{Quantity}}{}\left({1.2}{\,}{0.6}\right)$
 (4) 
>

e4 := Quantity( 1.2088, 0.263 );

${\mathrm{e4}}{\u2254}{\mathrm{Quantity}}{}\left({1.2088}{\,}{0.263}\right)$
 (5) 
>

ApplyRule( e4, round3g[1] );

${\mathrm{Quantity}}{}\left({1.21}{\,}{0.26}\right)$
 (6) 


round_cv



This rule does not modify the uncertainty of a quantitywitherror, 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 );

${\mathrm{e1}}{\u2254}{\mathrm{Quantity}}{}\left({1.2088}{\,}{0.563}\right)$
 (7) 
>

ApplyRule( e1, round_cv );

${\mathrm{Quantity}}{}\left({1.209}{\,}{0.563}\right)$
 (8) 


implicitize



This rule rounds the central value of a quantitywitherror 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 );

${\mathrm{e1}}{\u2254}{\mathrm{Quantity}}{}\left({1.2088}{\,}{0.563}\right)$
 (9) 
>

ApplyRule( e1, implicitize );


In the above example, ApplyRule constructed a new Quantity object with zero uncertainty, which automatically simplifies to the central value.




