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

Online Help

All Products    Maple    MapleSim


ScientificErrorAnalysis

  

UseRule

  

set the default rounding rule

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

UseRule( name )

Parameters

name

-

symbol; name of a rounding rule

Description

• 

The UseRule( name ) command sets the default rounding rule used by ScientificErrorAnalysis to the rule name for the current session.

• 

To set the default rounding rule for all future Maple sessions, add the UseRule command to your Maple initialization file. For more information, see Create Maple Initialization File.

• 

The rule name may require an index.

• 

If the rule name is specified with an index, UseRule checks the validity of the index. If the index is invalid, the stored procedure for the rule throws an error and the default rule is not changed.

  

To check, the rule is applied to Quantity( 0.0, 1.0 ). If no error is triggered, the result is discarded.

• 

For more information on predefined rules in ScientificErrorAnalysis, see Predefined Rounding Rules.

Examples

withScientificErrorAnalysis:

e1Quantity1.2088,0.563

e1Quantity1.2088,0.563

(1)

UseRuleround2

ApplyRulee1

Quantity1.21,0.56

(2)

The index to the rule round must be a positive integer. If another value is used, UseRule returns an error and the default rule is not changed.

UseRuleround0

Error, (in ScientificErrorAnalysis:-UseRule) invalid index to `round`

UsingRule

round2

(3)

See Also

Create Maple Initialization File

Rounding rules

ScientificErrorAnalysis

ScientificErrorAnalysis[ApplyRule]

ScientificErrorAnalysis[GetRules]

ScientificErrorAnalysis[HasRule]

ScientificErrorAnalysis[Quantity]

ScientificErrorAnalysis[UsingRule]