This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: 18.335 Problem Set 2 Due Friday, 1 October 2010. Problem 1: Floating-point (a) Trefethen, probem 13.2. (For part c , you can use Matlab, which employs IEEE double precision by default.) (b) A generalization of Trefethen, problem 14.2: given a function g ( x ) that is analytic (i.e., has a Taylor series) for | x | sufficiently small, and g (0) 6 = 0 , show that g ( O ( )) = g (0) + g (0) O ( ) . Problem 2: Addition This problem is about the floating-point error in- volved in summing n numbers, i.e. in computing the function f ( x ) = n i =1 x i for x F n ( F being the set of floating-point numbers), where the sum is done in the most obvious way, in sequence. In pseudocode: sum = for i = 1 to n sum = sum + x i f ( x ) = sum For analysis, it is a bit more convenient to define the process inductively: s = s k = s k- 1 + x k for < k n, with f ( x ) = s n . When we implement this in floating-point, we get the function f ( x ) = s n , where s k = s k- 1 x k , with denoting (correctly rounded) floating-point addition. (a) Show that f ( x ) = ( x 1 + x 2 ) Q n k =2 (1 + k ) + n i =3 x i Q n k = i (1+ k ) , where the numbers k satisfy | k | machine . (b) Show that Q n k = i (1+ k ) = 1+ i where | i | ( n- i + 1) machine + O ( 2 machine ) ....
View Full Document
- Spring '06