Contents
Due 8:00am, Thursday, August 28, 2025.
To ensure you are all up and running right away with computing, here is a small assignment due a the beginning of class Thursday.
Install Anaconda as described in the class description, and replicate the implementation of Newton's method that I did in class today.
Bring your laptop to class and show me that you got it to work. If you run into any difficulties with this, please let me know by email right away.
Due 11:59pm, Friday, September 5, 2025.
[4 points]
Take the last 4 digits of your UB person number, interpreted as a decimal integer, and divide by 100. By hand, determine the binary representation the resulting number. (For example, if your person number were 87654719, you'd find the binary representation of 47.19.) Use the repeated multiplying and dividing by 2 method shown in class, and show all your work.
A floating point system similar to the IEEE 754 system has: a sign bit, then a 2-bit exponent biased by 2, then a 3-bit mantissa. Assuming all bit-codes are used for numbers, and that the all-zeros code is used for 0 ...
a [4 points] List all the non-negative machine numbers in this system if denormalization is NOT used. For each, give the bit-code in both binary and hex form (pad with zeros on the left for the hex conversion), the number it represents - in binary fixed-point form (e.g. 110.0101), and finally in decimal notation (e.g. 1.875).
b What is the smallest positive machine number with and without denormalization. For each, give all the forms requested in part a.
c [1 point] The "machine epsilon" or εmach, defined to be the difference between 1 and the next larger machine number, is a very important characteristic of a floating point number system like this. What is εmach for this system?
d [1 point] How big is the "hole at zero" for this system in part (a), i.e. the gap between the smallest positive number and 0?
e [1 point] How big is the hole at zero in part (b)?
f [1 point] What would be the largest number in the system if the top exponent code were reserved for "Inf"s and "NaN"?
Note to self: The now-reduced part b can be omitted because it's covered in part d.
[5 points] Derive by hand the hexadecimal machine IEEE 754 64-bit code for the number 9.3. Show all the steps clearly.
Due 11:59pm, Friday, September 12, 2025.
Consider the difficulty of accurately evaluating sin x - x when x is near 0.
a [5 points] Find an approximate bound for the relative rounding error in evaluating the formula directly (in terms of machine epsilon). The desired answer is a small multiple of machine epsilon divided by a power of x. You may use low-order Taylor polynomial approximations and discard higher order terms when appropriate in order to get this answer.
b [3 points] Find a bound on the relative truncation error incurred by using the approximation sin x - x ~ -x^3/3! + x^5/5! - x^7/7!.
c [5 points] If we use the approximation sin x - x ~ -x^3/3! + x^5/5! - x^7/7!, for approximately which values of x (near 0) will the approximation be evaluated more accurately than the formula sin x - x itself if we are using arithmetic with machine epsilon = 2^-52? How many decimal digits are reliable in the worst case if we use the approximation and direct evaluation in the appropriate ranges? It is essential that you show all your work and make your reasoning clear to the grader!
a Ackleh 2.10.1(a) [3 points]
b Ackleh 2.10.3 using Python. [(a) 3 points, (b) 3 points]
c Ackleh 2.10.4 (4th root of 1000) [1 point]
Python formatting hint (uses an "f-string"):
print(f'{1/300:+.8f} {1/300:.15e} and {777:4d}')
+0.00333333 3.333333333333334e-03 and 777
Due 11:59pm, Friday, September 19, 2025.
For each of the 6 functions, g, whose graphs are sketched below:
Consider the example g(x) = (x2 + 6) ⁄ 5 on G=[1,2.3]. Show that g maps G into G and show that g is a contraction, either by brute force or using appropriate Propositions from Section 2.3.
Transcribe the statement and proof of Proposition 2.3, p 42, explain the hypothesis that's in addition to g being a contraction, and explain and/or justify each step of the proof.
[more to come]