Question: The following lines of MATLAB code evaluate the function 2r at 15-10-16 in four different ways (a) x = 1.5e-16; x = 1.5e-16; 1.5e-16; x1.5e-16;

 The following lines of MATLAB code evaluate the function 2r at

The following lines of MATLAB code evaluate the function 2r at 15-10-16 in four different ways (a) x = 1.5e-16; x = 1.5e-16; 1.5e-16; x1.5e-16; f= 0.5* ( (exp (x)-exp (-x))/x) f=0.5* ((exp (x)-exp(-x))/((x+1)-1)) f (b) (c) =0.54((exp (x)-exp(-x) ) / ( (x-1)+1)) f(exp (x)-exp(-x))/((x+1)+(x-1)) x= (d) What are the four computed values of f, if IEEE floating point arithmetic is used? You can assume texp) and exp-) are calculated exactly and then rounded to the nearest floating-point number. Hint: From Taylor's theorem, exp(E) x2 3! for some between 0 and 2. The following lines of MATLAB code evaluate the function 2r at 15-10-16 in four different ways (a) x = 1.5e-16; x = 1.5e-16; 1.5e-16; x1.5e-16; f= 0.5* ( (exp (x)-exp (-x))/x) f=0.5* ((exp (x)-exp(-x))/((x+1)-1)) f (b) (c) =0.54((exp (x)-exp(-x) ) / ( (x-1)+1)) f(exp (x)-exp(-x))/((x+1)+(x-1)) x= (d) What are the four computed values of f, if IEEE floating point arithmetic is used? You can assume texp) and exp-) are calculated exactly and then rounded to the nearest floating-point number. Hint: From Taylor's theorem, exp(E) x2 3! for some between 0 and 2

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!