Hello, if you have any need, please feel free to consult us, this is my wechat: wx91due
CS323: Numerical Analysis and Computing Homework #1
For all programming assignments, please turn in your code along with your solution. Submissions should be made on Sakai.
Problem 1
What are the approximate absolute and relative errors in approximating π� by each of the following quantities?
- 33
- 3.143.14
- 22/722/7
You can use either single or double precision for your computations. Please state your choice.
Problem 2
In either single or double precision, is the machine epsilon the smallest number ε� that can be stored on the computer, such that 1+ε≠11+�≠1? Justify your answer.
Problem 3
Write a program to compute the absolute and relative errors in Stirling’s approximation
for n=1,2,…,10�=1,2,…,10. Does the absolute error grow or shrink as n� increases? Does the relative error grow or shrink as n� increases? Is the result affected when using double precision instead of single precision?
Problem 4
Let x∈Rn�∈�� be an n�-dimensional vector. Show that ∥x∥2‖�‖2 and ∥x∥∞‖�‖∞ are equivalent.
Problem 5
Consider the image blurring example discussed in class, and suppose we denote the matrix of grayscale pixel values as I�. Modify the Python script blur.py to use the following operation instead:
Compute the blurred image after 2020 iterations of this modified scheme.