Answered step by step
Verified Expert Solution
Question
1 Approved Answer
If u and y are floating-point numbers, then the evaluation of f(x,y) = -r-V 22 y in a floating point system may be very inaccurate
If u and y are floating-point numbers, then the evaluation of f(x,y) = -r-V 22 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 for parts (a) and (b) below. (a) Let I = 123.4 = 0.1234 x 103 and y = -1.234 = -0.1234 x 10', evaluate fi (F(1, y)) and determine the relative error. (b) Now let x = -123.4 = -0.1234 x 103 and y = 1.234 = 0.1234 x 101, evaluate fl(fr, y)) and determine the relative error. (c) Based on the above results and similar kinds of computations (you might do some more computations, but it is not necessary to hand them in), specify which ranges of values of u and y are such that the computation of f(f(z,y) will always be very inaccurate? (Your ranges can be loosely deifned, that is, you do not have to give specific numeric bounds. You may say things like "large x, or "large y", or "small positive x, etc.) If u and y are floating-point numbers, then the evaluation of f(x,y) = -r-V 22 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 for parts (a) and (b) below. (a) Let I = 123.4 = 0.1234 x 103 and y = -1.234 = -0.1234 x 10', evaluate fi (F(1, y)) and determine the relative error. (b) Now let x = -123.4 = -0.1234 x 103 and y = 1.234 = 0.1234 x 101, evaluate fl(fr, y)) and determine the relative error. (c) Based on the above results and similar kinds of computations (you might do some more computations, but it is not necessary to hand them in), specify which ranges of values of u and y are such that the computation of f(f(z,y) will always be very inaccurate? (Your ranges can be loosely deifned, that is, you do not have to give specific numeric bounds. You may say things like "large x, or "large y", or "small positive x, etc.)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started