Student[NumericalAnalysis]
RelativeError
compute the relative error of an approximation
Calling Sequence
Parameters
Options
Description
Examples
RelativeError(xe, xa, opts)
xe
-
realcons; the exact value
xa
realcons; the approximated value
opts
optional equation(s) of the form keyword = value, where keyword is: digits; the options for computing the relative error of xa
digits = posint
A positive integer; the environment variable Digits will be set to this integer during the execution of this procedure. By default, Digits is 10.
The RelativeError command computes the relative error of xa with respect to the exact value xe.
with⁡StudentNumericalAnalysis:
appr≔2.89×108
exac≔2.98×108
RelativeError⁡exac,appr,digits=5
0.030201
See Also
Student[NumericalAnalysis][AbsoluteError]
Student[NumericalAnalysis][ComputationOverview]
Download Help Document