pset2-f10-2 - 18.335 Problem Set 2 Due Friday, 1 October...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the 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

Page1 / 2

pset2-f10-2 - 18.335 Problem Set 2 Due Friday, 1 October...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online