Question: Question #2 - 6 marks. If a and y are floating-point numbers, then the evaluation of f(x, y) = -1 - VT? - 4 in

 Question #2 - 6 marks. If a and y are floating-point

Question #2 - 6 marks. If a and y are floating-point numbers, then the evaluation of f(x, y) = -1 - VT? - 4 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 x = 123.4 = 0.1234 x 10' and y = -1.234 = -0.1234 x 10', evaluate f(f(,y)) and determine the relative error. (b) Now let r = -123.4 = -0.1234 x 10' and y = 1.234 = 0.1234 x 10', evaluate f(f(x,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 r and y are such that the computation of f (x,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.) Question #2 - 6 marks. If a and y are floating-point numbers, then the evaluation of f(x, y) = -1 - VT? - 4 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 x = 123.4 = 0.1234 x 10' and y = -1.234 = -0.1234 x 10', evaluate f(f(,y)) and determine the relative error. (b) Now let r = -123.4 = -0.1234 x 10' and y = 1.234 = 0.1234 x 10', evaluate f(f(x,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 r and y are such that the computation of f (x,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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!