Professional Documents
Culture Documents
• Given
digits of precision:
• Multiplication – preserves significant digits since the exponent and
mantissa are calculated separately
• Addition – significant figures in one operand may be chopped since
both operands must have the same (highest) exponent
• Least significant figures of one operand are assumed to be insignificant in
the result, which has the higher exponent
3) Sum terms
• What is the expected value (at three digits of precision)?
3) Re-evaluate
Reformulation Example
•1) Identify possible loss of precision
2) Find a more stable formulation
Test for
Trigonometric Identities
• Pythagorean theorem
1 , 𝑦)
(𝑥
2 =
𝑦
2 +
𝑥 1
simplify...
• What is ? What is ?
General Taylor Series
• Identical
to a Maclaurin series shifted to the position
• The Maclaurin series is the Taylor series where
Taylor series approximations
• The
order of the series is the order of the highest term
• Calculate the 2rd-order Maclaurin polynomial for:
for some in .
• Unless you have a better approximation, just use
• Remove the catastrophic cancellation using the Mean Value
Theorem for large and small :
( 2 𝑥2−𝜖 )
𝜖𝑒
2𝜖
2 𝑥 +𝜖
Quadratic Equation
• Find the roots of a polynomial:
• Quadratic Equation:
• Relative error =
QE Reformulation
• When
, there is one small root
• Assume . We can reformulate the small root to make the
equation stable.
?
QE Simplification
• For
, we have two roots given by:
• Reformulate :
• Substitute into :
Standard QE Algorithm
•• For
− 𝑏 − √ 𝑏 2 − 4 𝑎𝑐 𝑥 = −2 𝑐
𝑥1 = 2
2𝑎 𝑏+ √ 𝑏2 −4 𝑎𝑐
• For
− 𝑏+ √ 𝑏2 − 4 𝑎𝑐 −2𝑐
𝑥1 = 𝑥 2 =
2𝑎 𝑏− √ 𝑏2 −4 𝑎𝑐
• If
where
then