Quantity - Maple Help

# Online Help

###### All Products    Maple    MapleSim

ScientificErrorAnalysis

 Quantity
 construct a quantity-with-error

 Calling Sequence Quantity( value, uncer, opts )

Parameters

 value - central value of the quantity-with-error uncer - absolute or relative uncertainty in the quantity-with-error opts - (optional) equation(s) of the form option=value, where option is one of 'relative', 'uld'; determine behavior

Description

 • The Quantity( value, uncer, opts ) command constructs a quantity-with-error in the form Quantity().
 • The constructed quantity-with-error has two arguments, the central value and absolute uncertainty.
 • The opts argument can contain one or more of the following equations that determine the behavior.
 'relative' = true or false
 If 'relative'=true, uncer is the relative uncertainty of the quantity, and the absolute uncertainty is calculated by multiplying value by uncer. The default value of 'relative' is false.
 The equation 'relative'=true can be abbreviated to 'relative'.
 'uld' = true or false
 If 'uld'=true, uncer is the uncertainty in the units in the least digit of the quantity, and the absolute uncertainty is calculated by multiplying uncer by the appropriate power of ten.  In this case, value must be a floating-point number. The default value of 'uld' is false.
 The equation 'uld'=true can be abbreviated to 'uld'.
 It is invalid to have both 'relative'=true and 'uld'=true.
 If 'relative'=false and 'uld'=false, uncer is the absolute uncertainty of the quantity.
 • No rounding of the central value or error is performed. To round a Quantity() object, use the ApplyRule function.
 • If the absolute uncertainty of the constructed quantity-with-error is zero, only the central value is returned.

Examples

 > $\mathrm{with}\left(\mathrm{ScientificErrorAnalysis}\right):$
 > $\mathrm{Quantity}\left(20.0,0.1\right)$
 ${\mathrm{Quantity}}{}\left({20.0}{,}{0.1}\right)$ (1)
 > $\mathrm{Quantity}\left(20.0,0.005,'\mathrm{relative}'\right)$
 ${\mathrm{Quantity}}{}\left({20.0}{,}{0.1000}\right)$ (2)
 > $\mathrm{Quantity}\left(20.0,1,'\mathrm{uld}'\right)$
 ${\mathrm{Quantity}}{}\left({20.0}{,}{0.1}\right)$ (3)
 > $\mathrm{Quantity}\left(12.3,0.01,'\mathrm{relative}'\right)$
 ${\mathrm{Quantity}}{}\left({12.3}{,}{0.123}\right)$ (4)
 > $\mathrm{ApplyRule}\left(,'\mathrm{round}\left[2\right]'\right)$
 ${\mathrm{Quantity}}{}\left({12.3}{,}{0.12}\right)$ (5)

 See Also