Keep It Simple, Stupid | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
The simple answer is that some decimal fractions cannot be accurately representred by binary fractions for similar reason as some ordinary fractions cannot be represented using decimal fractions. 1/3 is an exact value, but the closest we can get to representing it as a decimal fraction is 0.3333333333333... No matter how many 3's you add after the decimal point, you have never quite accurately represented it. Update: I couldn't work out how to easily show what I was trying to show, and the other posts say what I was trying to illustrate better than I was going to anyway. Cor! Like yer ring! ... HALO dammit! ... 'Ave it yer way! Hal-lo, Mister la-de-da. ... Like yer ring! In reply to Re: Still puzzled by floats
by BrowserUk
|
|