Call Now: (800) 537-1660  
The Algebra Buster
The Algebra Buster


May 25th









May 25th

Introduction to Scientific Computing

Purpose of the Project,
This project was de signed to make sure each student is comfortable with IEEE floating point numbers and
computer arithmetic, as well as potential errors associated with floating point arithmetic in limited preci-
sion environments.

You are required to write your solutions to this homework in LATEX. You are to submit the electronic
portions of your homework (the .tex file, the .pdf file, and the graphics les ) via WebCAT.

1. Suppose you are working with a machine that uses 6 bits to represent a number, 1 bit to represent
the sign, s, 2 bits to represent the exponent (characteristic), c, and 3 bits to represent the fraction
(mantissa), f.

(a) [4 points] De termine the value for \shift" here. Explain your reasoning.
(b) [6 points] Use a graphics package to draw a number line , and plot and label all of the positive
machine numbers representable with this machine on it. (Hint, you may want to color code
them for your own use, with one color for each c value.) Give the illustration here.
(c) [6 points] If you were allowed access to 3 additional bits to represent each number, and you
knew you needed to represent much smaller (in magnitude) numbers than what you've listed
above, give TWO ways in which you would change your number representation (in bits and/or
formula) to achieve this. Explain your reasoning.

2. Recall our Mini-Machine from class, that used 6 bits to represent a number, 1 bit to represent
the sign, s, 3 bits to represent the exponent (characteristic), c, and 2 bits to represent the fraction
(mantissa), f. In this case our floating point number was of the form

Suppose that was the \short form" representation for machine numbers on the Mini-Machine, and
there's also a \long form" available that utilizes twice as many bits to represent a number. With
the long form, the bits are distributed in the following fashion, 1 bit to represent the sign, 5 bits
to represent the exponent, and 6 bits to represent the fraction. The long form of the floating point
number is then given by

(a) [5 points] Explain why all of the short form numbers can be represented in the long form.
(b) [5 points] Find machine epsilon if the long format is our most precise representation of num-
bers?
(c) [5 points] How many long form floating point numbers are there between any two adjacent short
form floating point numbers? Explain your reasoning. (You really don 't want to enumerate
these. There are at least two ways to come up without enumerating them.)
(d) The following machine number is given in the \long format".

i. [3 points] Determine it's base 10 (decimal) equivalent . Show your calculations.
ii. [4 points] Find the next largest and smallest machine numbers, and represent these in their
\long format" as well as with their decimal equivalent . Label your answers accordingly.

3. [12 points] Prove that multiplication (of two non- zero numbers x and y) on a computer is a stable
operation, in terms of relative error.

4. [12 points] Use four-digit decimal oating point representation of numbers with rounding
arithmetic to perform the following calculations. Compute the absolute error and relative error with
the exact value determined to at least eight digits. Let
x = 192,4031, y = 0,00605008, z = 192,2758
(a) x * y
(b) x - z
(c) z/y

5. (a) [6 points] Use four-digit decimal floating point representation of numbers with chopping arith-
metic, and the quadratic formula,

to approximate the solutions to the quadratic equation given by
0.05010 x2 - 98.78 x + 5.015 = 0
You do NOT have to show all of your steps.
(b) [4 points] Compute the absolute and relative errors of each result, taking the true solutions to
be 1971,605916 and 0,05077069387.
(c) [5 points] Explain any surprising results, and make a suggestion on how to rearrange the calcu-
lation of the quadratic formula to improve your results.

6. The exact values of

(a) [9 points] Use calculus to evaluate Show all of your work! (L'Hopital' s Rule !!)
(b) [6 points] Use Excel (or any spreadsheet) to evaluate these expressions for x = 2-k for k =
1, 2,… , 30. Make sure you have at least six columns, one for k values, one for the x values,
and one column each for expressions A, B, C, and D. Make sure that you display each result
to 10 decimal places and have adequate space to display these digits. Turn in a copy of this
spreadsheet, saved as XGoesToZero.xls.
(c) [8 points] Does Excel produce the same result for expressions A, B, C and D for all values of x
here? If not, which formula is more reliable? Explain your reasoning thoroughly in terms of
the stability of computer arithmetic.

Prev Next
 
Home    Why Algebra Buster?    Guarantee    Testimonials    Ordering    FAQ    About Us
What's new?    Resources    Animated demo    Algebra lessons    Bibliography of     textbooks
 

Copyright © 2009, algebra-online.com. All rights reserved.