UVU CS-3320 – Numerical Software Development -Assignment 1

35.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You'll get a download link with a: zip solution files instantly, after Payment

Securely Powered by: Secure Checkout

Description

5/5 - (4 votes)

1. What is the logical bit layout of the number -12.5 in IEEE single-precision format (float)? Separate the
3 parts by a space for readability.

2. What is ulps(20,30) in IEEE single-precision?

3. What number is represented by the following IEEE single-precision value?

4. The number 20 can be expressed in binary as 1.01 x 2 4 , and 11 as 1.011 x 2 3 . Assuming 4 bits of
precision:
a) Do the binary arithmetic to compute 20 – 11. Give the answer in decimal.

b) Repeat part a) using 1 guard digit.

5. What is meant by the measure, “the number of ulps between floating-point numbers x and y?”

6. Describe the logical bit layout of an IEEE infinity.

7. Describe the logical bit layout of an IEEE NaN.

8. Describe the logical bit layout of an IEEE zero.

9. Describe the logical bit layout of an IEEE subnormal number.

10. How do subnormal numbers differ from normalized numbers with respect to:
a) Spacing
b) Relative Roundoff Error
c) What are guard digits , and why are they useful?

SECTION 0.2
3) Convert the following base 10 numbers to binary. Use overbar notation for non-terminating binary
numbers.
(a) 10.5

(b) ⅓

(c) 5/7

(d) 12.8

(e) 55.4

(f) 0.1

7) Convert the following binary numbers to base 10:
(a) 1010101

(b) 1011.101

c) 10111. 01

(d) 110. 10

(e) 10. 110

(f) 110. 1101

(g) 10.010 1101

(h) 111. 1

SECTION 0.3
5) Do the following sums by hand in IEEE double precision computer arithmetic, using the Rounding to
Nearest Rule. (Check your answers using MATLAB).
a)(1 + (2-51 + 2 -53 )) – 1

b) (1 + (2-51 + 2 -522 + 2-53)) – 1

SECTION 0.4
1) Identify for which values of x there is subtraction of nearly equal numbers, and find an alternate form
that avoids the problem.
a)1 − sec(x)/ tan2(x)

b)1 − (1 − x)3/X

c) 1 /1+x – 1/ 1-x

3) Explain how to most accurately compute the two roots of the equation x2 + bx − 10−12 = 0 , where b is
a number greater than 100.

 

  • Assignment1-nx84kp.zip