Question
Floating Point Arithmetic Let 8 x 10 be an arbitrary number and n a nonnegative integer. In exact arithmetic, the following computation leaves x unchanged:
Floating Point Arithmetic
Let 8 x 10 be an arbitrary number and n a nonnegative integer. In exact arithmetic, the following computation leaves x unchanged:
1 for i=1:n
2 x=4 log(x);
3 end
4
5 for i=1:n
6 x=exp(x/4.0);
7 end
However, in nite-precision arithmetic the results may be dramatically dierent for large n. The purpose of this assignment is to investigate the output of this computation in Matlab for various values of n and for x in the range 8 x 10. Your conclusions should be explained in a one-page report. Your report must include the following: (a) Representative plots of the output as a function of x, with each plot corresponding to a dierent value of n.
(b) A discussion of the smallest value of n after which the result of the nite-precision computation begins to dier from exact arithmetic computation.
(c) A discussion of the limiting behavior for large n. Attempt here to give the numbers you see on both the x and y axis and explain why you see those particular numbers.
(d) A brief explanation as to why computing in oating point arithmetic leads to the results you have found.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started