in reply to Still puzzled by floats
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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Still puzzled by floats
by jjdraco (Scribe) on Oct 07, 2002 at 07:24 UTC |