SwampCancel

# SwampCancel - Cancellation and Swamping The IEEE standard...

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

Cancellation and Swamping The IEEE standard 754 requires that the FAFA holds. That is: any arithmetic operation on two ﬂoats returns the ﬂoat 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 eﬀectively shifted to the right about m - p places. What were once signiﬁcant digits of the smaller number are now not as signiﬁcant, 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 ﬂoat to the true answer; it is working the way it is supposed to work. It is simply a fact of ﬂoating point arithmetic that in the
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Ask a homework question - tutors are online