CSE541; Winter 2012; R.Parent; HW5
CSE541 Homework #5
Answers
Due Date: Tuesday, Feb. 14
- Hardcopy written or typed answers are due at the beginning of class on the due date.
GENERAL INSTRUCTIONS
- Homework is due in lecture when I ask for it.
- All work must be your own.
You are not allowed to work in groups or use third party sources.
- Computer problems must be done using C/C++.
Turn in a hard copy of your code and print-outs of your sample runs.
Please keep this concise, i.e. I don't want you to turn in a lot of pages.
- All make-ups for homework must be accompanied by a documented and verifiable excuse well before the deadline.
Given the severity of the emergency please inform me as soon as possible.
- Please make sure your homework answers are legible, otherwise they will be marked wrong.
- Staple your pages.
- Homework submissions will NOT be accepted via email to me or the grader.
No late homework will be accepted.
- For each problem, SHOW ALL WORK in order to receive full credit. Just giving a final answer (correct or incorrect) will receive NO CREDIT.
Thus, you will be graded on the work shown.
- Each problem is worth the same amount (including the program and associated explanation). Similarly, each of the n homework assignments will be worth 1/nth of the total for Assignments. RIght now, it looks like 'n' will be 7.
ASSIGNMENT
-
Given an 8-bit version of the IEEE floating point format that uses a single sign bit, 4 bits for the exponent (excess-7 notation),and the 3-bit mantissa plus the hidden bit:
- What does 11000011 equal? Use decimal numbers in normalized scientific notation.
- What is the largest value that can be represented. Use decimal numbers in normalized scientific notation.
- What is this largest number as a decimal number (not using scientific notation).
- In IEEE formats, all zeros (00000000) is used as a special pattern to represent zero (0). Irrespective of this special use, what number would 00000000 represent using the format given above? (in decimal, not using scientific notation)
- Considering that all zeros is reserved for the special use of representing '0', what bit pattern is the number closest to zero and what number is it in decimal (not using scientific notation).
-
For Trapezoidal integration, compare estimates of integration when using one span of width h (call it I1) versus using two spans of width h/2 (call it I2). The equation for I2 can be put in the following form: I2 = k*I1 + s What is k? Give a geometric interpretation of 's'? (e.g. some fraction of the average height of something times the width of something). Show your work.
-
Consider a function with data points of (x,f(x)) as follows: (-1,-1), (0,0), (1,1)
- Derive the Lagrange interpolating polynomial that interpolates the function values.
- Derive the Newton form interpolating polynomial that interpolates the function
- Using the error term for the Newton form derived in 'b)', compute a bound on the error given the information that f''(x) is identically equal to 6 in the interval under consideration.
- Compare the interpolating polynomial you derived in 'b)' and the error term you derived in 'c)' with the actual function of f(x)=x^3 in the interval.
-
Using Taylor Series expansions, derive an estimate for the second derivative of a function including the error term.
Show your work to get any credit.
Discuss a geometric interpretation of the equation (e.g. how does it represent the change in direction of the curve)
-
Consider the following function, f(x) = sin(x).
For x in [0,π] use Romberg integration, using 1, 2, and 4 intervals, to estimate integral of the function. Compare to the actual value of the integral.