Quantity - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


ScientificErrorAnalysis

  

Quantity

  

construct a quantity-with-error

 

Calling Sequence

Parameters

Description

Examples

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

withScientificErrorAnalysis:

Quantity20.0,0.1

Quantity20.0,0.1

(1)

Quantity20.0,0.005,relative

Quantity20.0,0.1000

(2)

Quantity20.0,1,uld

Quantity20.0,0.1

(3)

Quantity12.3,0.01,relative

Quantity12.3,0.123

(4)

ApplyRule,round2

Quantity12.3,0.12

(5)

See Also

combine/errors

evalf

Rounding rules

ScientificErrorAnalysis

ScientificErrorAnalysis[ApplyRule]

ScientificErrorAnalysis[GetError]