Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Administration The Complete Guide To Dba Practices And Procedures

Authors: Craig S. Mullins

2nd Edition

0321822943, 978-0321822949

More Books

Students also viewed these Databases questions