Get Rule - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


ScientificErrorAnalysis

  

GetRule

  

return the procedure of a rounding rule

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

GetRule( name )

Parameters

name

-

symbol; name of an available rule

Description

• 

The GetRule( name ) command returns the procedure that performs the action of the rule name.

  

There is no procedure available for the rule 'digits'.

• 

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

Examples

> 

with⁡ScientificErrorAnalysis:

> 

GetRule⁡round

procx&comma;ylocalxp&comma;yp&comma;n&comma;usen&semi;ifnottype⁡procname&comma;&apos;indexed&apos;thenerror`round` must be indexedend if&semi;n ≔ op⁡procname&semi;ifnottype⁡n&comma;&apos;posint&apos;thenerrorinvalid index to `round`end if&semi;xp&comma;yp ≔ evalf⁡x&comma;evalf⁡y&semi;ifxp<>0thenusen ≔ n&plus;ilog10⁡SFloatMantissa⁡xp − ilog10⁡SFloatMantissa⁡yp&plus;SFloatExponent⁡xp − SFloatExponent⁡yp&semi;iftype⁡usen&comma;&apos;integer&apos;thenifusen<1then0.&comma;evalf&lsqb;n&rsqb;⁡ypelseevalf&lsqb;usen&rsqb;⁡xp&comma;evalf&lsqb;n&rsqb;⁡ypend ifelseevalf&lsqb;n&rsqb;⁡xp&comma;evalf&lsqb;n&rsqb;⁡ypend ifelse0.&comma;evalf&lsqb;n&rsqb;⁡ypend ifend proc

(1)

See Also

Rounding rules

ScientificErrorAnalysis

ScientificErrorAnalysis[AddRule]

ScientificErrorAnalysis[ApplyRule]

ScientificErrorAnalysis[GetRules]

ScientificErrorAnalysis[HasRule]