precision

# precision - 1 sin x =(1 sin x(1 sin x(1 sin x =(1 sin 2 x(1...

This preview shows pages 1–10. Sign up to view the full content.

Week 3 - HW submission - Nested multiplication - Loss of precision

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

View Full Document
Nested Multiplication p.12 #6: 5x 3 + 2x 2 + x + 10 = ((5x + 2)x + 1)x + 10
p.12 #8: (c) 6(x+2) 3 + 9(x+2) 7 +3(x+2) 15 - (x+2) 31 (x+2) 3 (6 + 9(x+2) 4 +3(x+2) 12 - (x+2) 28 ) (x+2) 3 (6 + (x+2) 4 (9 + 3(x+2) 8 -(x+2) 24 )) (x+2) 3 (6 + (x+2) 4 (9+(x+2) 8 (3-(x+2) 16 ))) Done! Nested Multiplication

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

View Full Document
p.12 #8: (d) -3x 7 + 10x 17 + - 5x 37 + x 127 x 7 (-3 + 10x 10 - 5x 30 + x 120 ) x 7 (-3 + x 10 (10 - 5x 20 + x 110 )) x 7 (-3 + x 10 (10 + x 20 (-5 + x 90 ))) Nested Multiplication
Loss of precision - Rationalization - Taylor expansion

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

View Full Document
Loss of precision Avoid loss of significance around 2: √(x+4) - 2 = (√(x+4) - 2) * √ (x+4) + 2 √(x+4) + 2 = x+4 - 4 = x √(x+4) + 2 √(x+4) + 2 √(x+4) - 2
Avoid loss of significance around ∏/2

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

View Full Document

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 - sin x = (1 - sin x) * (1 + sin x) (1 + sin x) = (1 - sin 2 x) (1 + sin x) = (cos 2 x ) (1 + sin x) 1 - sin x Loss of precision Loss of precision cos x = 1 - x 2 + x 4- . .. 2! 4! 1 - cos x = 1 - (1 - x 2 + x 4 ) 2! 4! = x 2- x 4 2! 4! Why does this help? If you have x-y, 2 < 1 - y/x < 2 Then p is the minimum bits wrong and q is the maximum bits wrong Subtraction error:-q-p Loss of precision Precision loss example: x - sin(x) around x=0.1 2-10 < 1 - sin 0.1 < 2-9 0.1 Loss of precision 0.00097 < 0.0016 < 0.0019...
View Full Document

{[ snackBarMessage ]}

### Page1 / 10

precision - 1 sin x =(1 sin x(1 sin x(1 sin x =(1 sin 2 x(1...

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

View Full Document
Ask a homework question - tutors are online