Question: Problem 1.2. Look at this Matlab transcript. >> format long >> 1+eps ans = 1.00000000000000 >> ans-1 ans = 2.220446049250313e-016 >> 1+0.4*eps ans = >>

Problem 1.2. Look at this Matlab transcript. >> format long >> 1+eps ans = 1.00000000000000 >> ans-1 ans = 2.220446049250313e-016 >> 1+0.4*eps ans = >> 1+0.9*eps ans = 1.00000000000000 >> ans-1 ans = 2.220446049250313e-016 We are using double-precision floating point arithmetic here, and eps is a built-in Matlab variable con- taining the value of machine epsilon. The output tells us if we use double-precision floating point arith- metic, 1+0.4*eps and 1 are the same numbers, and 1+eps and 1 are different numbers although 1+eps and 1+.9*eps are the same. (You can tell that 1+.9*eps is not the same as 1 because of the zeros after the decimal point in line 13.) Now answer the following questions: (a) Find the IEEE double-precision (64-bit) representation of the number 1. (b) Find the IEEE double-precision number 1.5 x 106. (c) Use your answer from (b) to determine the largest number you can add to 1.5 x 106 and still get 1.5 x 106. Do some experimentation with Matlab to verify your result. Problem 1.2. Look at this Matlab transcript. >> format long >> 1+eps ans = 1.00000000000000 >> ans-1 ans = 2.220446049250313e-016 >> 1+0.4*eps ans = >> 1+0.9*eps ans = 1.00000000000000 >> ans-1 ans = 2.220446049250313e-016 We are using double-precision floating point arithmetic here, and eps is a built-in Matlab variable con- taining the value of machine epsilon. The output tells us if we use double-precision floating point arith- metic, 1+0.4*eps and 1 are the same numbers, and 1+eps and 1 are different numbers although 1+eps and 1+.9*eps are the same. (You can tell that 1+.9*eps is not the same as 1 because of the zeros after the decimal point in line 13.) Now answer the following questions: (a) Find the IEEE double-precision (64-bit) representation of the number 1. (b) Find the IEEE double-precision number 1.5 x 106. (c) Use your answer from (b) to determine the largest number you can add to 1.5 x 106 and still get 1.5 x 106. Do some experimentation with Matlab to verify your result
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
