There's more than one way to do things | |
PerlMonks |
Re: Still puzzled by floatsby BrowserUk (Patriarch) |
on Oct 07, 2002 at 06:32 UTC ( [id://203259]=note: 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 Section
Seekers of Perl Wisdom
|
|