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: Structure And Method, Book 1
(REV)00th Edition
ISBN:9780395977224
Author:Richard G. Brown, Mary P. Dolciani, Robert H. Sorgenfrey, William L. Cole
Publisher:Richard G. Brown, Mary P. Dolciani, Robert H. Sorgenfrey, William L. Cole
Chapter4: Polynomials
Section4.1: Exponents
Problem 5E
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: 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
College Algebra
Algebra
ISBN:
9781305115545
Author:
James Stewart, Lothar Redlin, Saleem Watson
Publisher:
Cengage Learning
Algebra & Trigonometry with Analytic Geometry
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:
9781133382119
Author:
Swokowski
Publisher:
Cengage
Holt Mcdougal Larson Pre-algebra: Student Edition…
Holt Mcdougal Larson Pre-algebra: Student Edition…
Algebra
ISBN:
9780547587776
Author:
HOLT MCDOUGAL
Publisher:
HOLT MCDOUGAL
Elementary Algebra
Elementary Algebra
Algebra
ISBN:
9780998625713
Author:
Lynn Marecek, MaryAnne Anthony-Smith
Publisher:
OpenStax - Rice University
PREALGEBRA
PREALGEBRA
Algebra
ISBN:
9781938168994
Author:
OpenStax
Publisher:
OpenStax