SwampCancel

SwampCancel - Cancellation and Swamping The IEEE standard...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Cancellation and Swamping The IEEE standard 754 requires that the FAFA holds. That is: any arithmetic operation on two floats returns the float nearest the true value. Here we discuss two principle ways information can be lost in this setting. Consider what happens when adding a | large | number 0 .d 1 d 2 ··· d t × 2 m and a | small | number 0 .e 1 e 2 ··· e t × 2 p . Since only t digits can remain in the result, the digits of the smaller number are effectively shifted to the right about m - p places. What were once significant digits of the smaller number are now not as significant, and about m - p of them are lost completely: 0 . d 1 d 2 ··· d m - p d m - p +1 ··· d t - 1 d t + 0 . 0 0 ··· 0 e 1 e 2 ... e t - ( m - p ) 0 . d 1 d 2 ··· d m - p f m - p +1 ··· f t - 1 f t The result is the closest float to the true answer; it is working the way it is supposed to work. It is simply a fact of floating point arithmetic that in the
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.
Ask a homework question - tutors are online