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
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