Question: (a) Write a Matlab code to compute the machine epsilon mach (using the pseudocode on page 47) in single precision. Your output should print: the
(a) Write a Matlab code to compute the machine epsilon mach (using the pseudocode on page 47) in single precision. Your output should print: the machine epsilon = ...
(b) Modify your code and also find the double precision machine epsilon mach on the computer you use.
(c) Comparing your single and double precision answers for the machine epsilon, how many digits does double precision add to the mantissa and how many to the exponent?
(d) Matlab has it a built-in constant, eps. Type:matlab
eps
Maple has one too. Type:
maple readlib(Maple_floats): evalhf(DBL_EPSILON);
Do the values from (a)(d) agree? Which one is correct?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
