Question
Take the last two digits of your school ID number and call it m. m= 40 1. Find the binary floating-point representation and machine representation
Take the last two digits of your school ID number and call it m. m= 40
1. Find the binary floating-point representation and machine representation in IEEE double-precision format for mmby hand, then confirm your answer by using MATLAB command "format hex". You can use the "diary" function in MATLAB to save your output in a text file. Submit both your hand-written work and the MATLAB output file.
2. To generate overflow errors on your computer, write a MATLAB program (overflow.m) to evaluate m^n for n=1,2,3,4,. Eventually, you will exceed your machine's exponent limit for floating-point numbers. Find the smallest n that causes an overflow error. To do this, you may want to use the "while" statement with an appropriate condition so that the loop gets terminated once the smallest n is reached. Submit your code and the output. You can observe underflow errors by computing 1/m^n . Write a MATLAB program to determine the smallest n that caused the underflow error. Write your programs so that they print only the number n that gives you the overflow/underflow errors.
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