Question: Elementary Numerical Analysis. Homework 1. 1. Convert the following decimal numbers to binary and hexadecimal forms 65, 10.01, 33.8125. 2. Convert the following numbers to
Elementary Numerical Analysis.
Homework 1.
1. Convert the following decimal numbers to binary and hexadecimal forms
65, 10.01, 33.8125.
2. Convert the following numbers to decimal form
(1011.011)2, (B5A.D4)16.
3. Calculate directly in base 2
1110.0111 + 101.01 =? 1110.0111 101.01 =? 1110.0111 101.01 =? 1110.0111 / 101.01 =?
4. The following MATLAB program computes the unit roundo of the computer that you are using:
k = 0;
twopowerk = 1.0;
half = 1.0/2.0;
b = 1.0;
while (b ~= 0.0)
k = k-1;
twopowerk = twopowerk*half;
a = 1.0 + twopowerk;
b = a - 1.0;
end
fprintf(k=%3.2d unit roundoff=%20.16e ,k,twopowerk)
Type and run this program. What is the nal value of k? What is the value of the unit roundo?
5. What are the exact values of the machine epsilon M, of the unit roundo u, of the smallest and largest positive normalized oating-point numbers xmin and xmax, and of the largest representable integer M for IEEE double precision arithmetic which uses rounding and whose parameters are b = 2,p = 53,emin = 1022,emax = 1023? Give your results in base 10 with at least 12 correct signicant digits.
6. For the simple academic example of oating-point arithmetic (b = 2,p = 3,emin = 2,emax = 2, see p. 5 of the class notes) what are the corresponding oating-point representations of (1.4)10 and of (2.75)10 using rounding?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
