Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

( 2 5 pts ) Consider the function f ( x ) = 1 - x 2 2 - 1 + x 2 2 We

(25pts) Consider the function
f(x)=1-x22-1+x22
We want to compute it accurately in the IEEE single precision standard (,t,emin,emax)=
(2,24,-126,128).
A) Rearrange f(x) in a manner so that it will be computed accurately for small x.
f(x)=-2x21-x22+1+x22
B) Give a good approximate value for f(10-7) computed by your algorithm. Briefly justify your
answer.
f(10-7)=-2(10-7)21-(10-7)22+1+(10-7)22=-210-141-10-142+1+10-142~~-10-14~~0
The single precision standard can hold 24 bits or less, so the relative error 10-14 becomes zero.
C) Argue why your algorithm can produce a better result than computing with the original
expression.

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_2

Step: 3

blur-text-image_3

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 Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

More Books

Students also viewed these Databases questions

Question

How does selection differ from recruitment ?

Answered: 1 week ago