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: Floatingpoint (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 floatingpoint 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 floatingpoint 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 floatingpoint, we get the function ˜ f ( x ) = ˜ s n , where ˜ s k = ˜ s k 1 ⊕ x k , with ⊕ denoting (correctly rounded) floatingpoint 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
 Prof.CarolLivermore
 Addition, Summation, double precision

Click to edit the document details