3. (10 marks) Floating Point Error Analysis Suppose y is an exact floating point real number. Give a bound on the relative error of the f loating point calculation (y ⊖1)⊗(y ⊕1) with respect to the true value of y2 − 1 in terms of machine epsilon E ( assuming no overf low/underflow occurs ).
Added by Yolanda G.
Step 1
- We need to analyze the expression \((y \ominus 1) \otimes (y \oplus 1)\), where \(\ominus\) represents subtraction and \(\oplus\) represents addition in floating point arithmetic. The true value we are comparing against is \(y^2 - 1\). Show more…
Show all steps
Your feedback will help us improve your experience
Adi S and 67 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
(a) Consider the expression f(x) = 1/(x - 2) when x is close to 2. Using floating-point base 10, k = 3, rounding arithmetic, determine the relative error in evaluating f(x) when x = 2 + 2/300 = 2.00666.... (b) For certain values of x, the floating-point evaluation of h(x) = e^x - e^(-x) is inaccurate due to subtractive cancellation. Using order 4 Taylor polynomial approximations for e^x and e^(-x), expanded around a = 0, give an alternative expression for evaluating h(x) that will not have issues with subtractive cancellation. (No need to prove or verify the new expression is better.)
Adi S.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD