CS205A review_1

Scientific Computing

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: CS205 Review Session #1 Notes 1 HW 1.1 Hints 1.1 Addition Example Recall that the relative error is defined as: relative error = computed result- analytic result analytic result Consider the relative error induced by the addition of two positive numbers x and y . The simple act of storing each number in floating-point introduces some error yielding ¯ x = (1 + 1 ) x and ¯ y = (1 + 2 ) y . Performing the addition induces some roundoff error both for the operation itself as well as the storage of the result, which we will model as (1+ 3 )(¯ x + ¯ y ). So: R.E. = (1 + 3 )((1 + 1 ) x + (1 + 2 ) y )- ( x + y ) x + y ≤ (1 + 3 )(1 + 4 )( x + y )- ( x + y ) x + y = | (1 + 3 )(1 + 4 )- 1 | = | (1 + 5 ) 2- 1 | ≤ (1 + max ) 2- 1 = 2 max + O ( 2 max ) 1.2 Aside Consider a sequence of multiplied rounding error factors: (1 + 1 )(1 + 2 ) ··· (1 + k ) It’s clear that the cumulative error can be bounded both above and below by: (1- max ) k ≤ (1 + 1 )(1 + 2 ) ··· (1 + k ) ≤ (1 + max )...
View Full Document

This note was uploaded on 01/29/2008 for the course CS 205A taught by Professor Fedkiw during the Fall '07 term at Stanford.

Page1 / 3

CS205A review_1 - CS205 Review Session#1 Notes 1 HW 1.1 Hints 1.1 Addition Example Recall that the relative error is defined as relative error =

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