Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

If r and y are floating-point numbers, then the evaluation of f(x,y) = may be very inaccurate due to cancellation. For example, with base b

image text in transcribed

If r and y are floating-point numbers, then the evaluation of f(x,y) = may be very inaccurate due to cancellation. For example, with base b = 10, precision k = 4 idealized chopping arithmetic, ifl 12.34 and y = 0.9555, then the following results are obtained: A(-) = fl(152.2756) = 152.2 or 0.1522x 103. fl(y*) =A(0.91298025) = 0.9129 A(2,2 + y2)-A(152.2 + 0.9129) = A(153.1 129) = 153.1 A(Vz? + y*) =A(V153.1) =A( 12.37335 ) = 12.37 f (v/r2 + y2 + x-A( 12.37-12.34) = A(0.03) = 0.03 fl(f(z, y)-A(yN12 + y2 + -A(0.9555/0.03) = A(31.85) = 31.85 However, the correct value of f(x, y) is 25.868066..., so the floating-point approximation has a large relative error (around 23%). Note that f(x,y) can be rewritten as g(x, y) (a) Using base b = 10, precision k = 4, idealized chopping arithmetic, =-12.34 and y = 0.9555, evaluate A(g(x,y)) and determine the relative error (b) For each of the specified data in the table below, place an X in the appropriate box to indicate which of the formulas f(z,y) or g(x,y) is more accurate in precision k = 4 floating-point arithmetic, or if they are both accurate. Put exactly one X in each row of the table. (No justification for your answers is required. It is NOT necessary to do any floating-point computation to answer this question.) data f(x, y) more accurateg(, y) more accurate both accurate 0.1234. y = 12.34 = 12.34, y =-0.9123 T =-0.1234. y =-0.005678

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

Transactions On Large Scale Data And Knowledge Centered Systems Vi Special Issue On Database And Expert Systems Applications Lncs 7600

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Stephen W. Liddle ,Klaus-Dieter Schewe ,Xiaofang Zhou

2012th Edition

3642341780, 978-3642341786

More Books

Students also viewed these Databases questions

Question

Distinguish between formal and informal reports.

Answered: 1 week ago