Student[NumericalAnalysis] - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Education : Student Package : Numerical Analysis : Computation : Student/NumericalAnalysis/NumberOfSignificantDigits

Student[NumericalAnalysis]

  

NumberOfSignificantDigits

  

compute the number of significant digits of an approximation

 

Calling Sequence

Parameters

Options

Description

Examples

Calling Sequence

NumberOfSignificantDigits(xe, xa, opts)

Parameters

xe

-

realcons; the exact value

xa

-

realcons; the approximate value

opts

-

(optional) equation(s) of the form keyword = value, where keyword is: digits; the options for computing the number of significant digits

Options

• 

digits = posint

  

A positive integer; the environment variable Digits will be set to this integer during the execution of this procedure. By default this is set to 10.

Description

• 

The NumberOfSignificantDigits command computes the number of significant digits of an approximation using the exact value and approximate value.

• 

The number, SD, of significant digits is computed by the formula

SDxe,xa=max0,maxilog10xe,ilog10xailog102xe2xa

  

This formula returns the largest integer n such that xe and xa differ by less than 0.5 units in the nth place.  For example, for xe=19.123456 and xa=19.123955 we have n=5, because the difference between xe and xa is 0.499 units in the 5th place (digit), while for xa=19.123956 we have n=4 because the difference is now 0.500 units in the 5th place (so too large to set n=5).

Examples

withStudent[NumericalAnalysis]:

xe1.81

xe:=1.81

(1)

xa1.63

xa:=1.63

(2)

NumberOfSignificantDigitsxe,xa

1

(3)

xe9.81

xe:=9.81

(4)

xa9.63

xa:=9.63

(5)

NumberOfSignificantDigitsxe,xa

1

(6)

See Also

Student[NumericalAnalysis]

Student[NumericalAnalysis][AbsoluteError]

Student[NumericalAnalysis][ComputationOverview]

Student[NumericalAnalysis][RelativeError]

 


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