Get Rule - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

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

withScientificErrorAnalysis:

GetRuleround

procx&comma;ylocalxp&comma;yp&comma;n&comma;usen&semi;ifnottypeprocname&comma;&apos;indexed&apos;thenerror`round` must be indexedend if&semi;nopprocname&semi;ifnottypen&comma;&apos;posint&apos;thenerrorinvalid index to `round`end if&semi;xp&comma;ypevalfx&comma;evalfy&semi;ifxp<>0thenusenn&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]