return the procedure of a rounding rule - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Science and Engineering : Scientific Error Analysis : Commands : ScientificErrorAnalysis/GetRule

ScientificErrorAnalysis[GetRule] - return the procedure of a rounding rule

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

withScientificErrorAnalysis:

GetRuleround

procx&comma;ylocalxp&comma;yp&comma;n&comma;usen&semi;ifnottypeprocname&comma;&apos;indexed&apos;thenerror`round` must be indexedend if&semi;n:=opprocname&semi;ifnottypen&comma;&apos;posint&apos;thenerrorinvalid index to `round`end if&semi;xp&comma;yp:=evalfx&comma;evalfy&semi;ifxp<>0thenusen:=n&plus;ilog10SFloatMantissaxpilog10SFloatMantissayp&plus;SFloatExponentxpSFloatExponentyp&semi;iftypeusen&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]


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam