If x and y are floating-point numbers, then the evaluation of f(x, y) : = -x – Vr2 - Y in a floating point system may be very inaccurate due to cancellation. To illustrate, use base b = 10, precision k = 4, idealized, chopping floating-point arithmetic below.

Advanced Engineering Mathematics
10th Edition
ISBN:9780470458365
Author:Erwin Kreyszig
Publisher:Erwin Kreyszig
Chapter2: Second-order Linear Odes
Section: Chapter Questions
Problem 1RQ
icon
Related questions
Question
If x and y are floating-point numbers, then the evaluation of
f(x, y)
- Væ²
= -x – Vx – y
in a floating point system may be very inaccurate due to cancellation. To illustrate, use base
b = 10, precision k = 4, idealized, chopping floating-point arithmetic below.
Transcribed Image Text:If x and y are floating-point numbers, then the evaluation of f(x, y) - Væ² = -x – Vx – y in a floating point system may be very inaccurate due to cancellation. To illustrate, use base b = 10, precision k = 4, idealized, chopping floating-point arithmetic below.
(a) Let x =
and determine the relative error.
-123.4 = -0.1234 × 103 and y
1.234 = 0.1234 x 10', evaluate fl(f(x,y))
(b) Determine a different way to evaluate f (x, y) which does not suffer from subtractive
cancellation.
(c) Repeat part (a) using the new form of f(x, y) that you derived in (b) to show that it
does not suffer from subtractive cancellation for the given values.
Transcribed Image Text:(a) Let x = and determine the relative error. -123.4 = -0.1234 × 103 and y 1.234 = 0.1234 x 10', evaluate fl(f(x,y)) (b) Determine a different way to evaluate f (x, y) which does not suffer from subtractive cancellation. (c) Repeat part (a) using the new form of f(x, y) that you derived in (b) to show that it does not suffer from subtractive cancellation for the given values.
Expert Solution
steps

Step by step

Solved in 5 steps

Blurred answer
Knowledge Booster
Tree
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, advanced-math and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Advanced Engineering Mathematics
Advanced Engineering Mathematics
Advanced Math
ISBN:
9780470458365
Author:
Erwin Kreyszig
Publisher:
Wiley, John & Sons, Incorporated
Numerical Methods for Engineers
Numerical Methods for Engineers
Advanced Math
ISBN:
9780073397924
Author:
Steven C. Chapra Dr., Raymond P. Canale
Publisher:
McGraw-Hill Education
Introductory Mathematics for Engineering Applicat…
Introductory Mathematics for Engineering Applicat…
Advanced Math
ISBN:
9781118141809
Author:
Nathan Klingbeil
Publisher:
WILEY
Mathematics For Machine Technology
Mathematics For Machine Technology
Advanced Math
ISBN:
9781337798310
Author:
Peterson, John.
Publisher:
Cengage Learning,
Basic Technical Mathematics
Basic Technical Mathematics
Advanced Math
ISBN:
9780134437705
Author:
Washington
Publisher:
PEARSON
Topology
Topology
Advanced Math
ISBN:
9780134689517
Author:
Munkres, James R.
Publisher:
Pearson,