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.

Algebra & Trigonometry with Analytic Geometry
13th Edition
ISBN:9781133382119
Author:Swokowski
Publisher:Swokowski
Chapter1: Fundamental Concepts Of Algebra
Section1.2: Exponents And Radicals
Problem 90E
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
Algebra & Trigonometry with Analytic Geometry
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:
9781133382119
Author:
Swokowski
Publisher:
Cengage
Intermediate Algebra
Intermediate Algebra
Algebra
ISBN:
9780998625720
Author:
Lynn Marecek
Publisher:
OpenStax College
Algebra: Structure And Method, Book 1
Algebra: Structure And Method, Book 1
Algebra
ISBN:
9780395977224
Author:
Richard G. Brown, Mary P. Dolciani, Robert H. Sorgenfrey, William L. Cole
Publisher:
McDougal Littell
College Algebra (MindTap Course List)
College Algebra (MindTap Course List)
Algebra
ISBN:
9781305652231
Author:
R. David Gustafson, Jeff Hughes
Publisher:
Cengage Learning
College Algebra
College Algebra
Algebra
ISBN:
9781938168383
Author:
Jay Abramson
Publisher:
OpenStax