49999 same w ith rounding if y ou w ant to simulate

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

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

Unformatted text preview: . (exactly ) and this is truncated to 12.49999 (same w ith rounding) (If y ou w ant to simulate binary machines do this: a. D o the operation EX A CT LY (in binary). b. T ake this result, KEEP the binary point, but truncate (or round) all bits follow ing the leading 24.) F or double precision simulation use 16 decimal digits or 52 binary bits. 3 . So, other than keeping track of w here the decimal point belongs, the decimal point (or binary point) has no effect on the calculation? T his simple simulation is actually exactly correct EX CEPT for w hat happens if overflow or underflow occurs: the number is above the overflow level or beneath the underflow level. In those cases w hat happens (stop, set result to zero, use an "Inf", ...) depends upon the computing e nvironment. T his happens so rarely (look at those underflow and overflow values up above) that w e w ill ignore it here. 4 . What does "precision" mean? Suppose an exact calculation results in v and the floating point calculations results in v . T he v v e rror is v v , the absolute...
View Full Document

Ask a homework question - tutors are online