From: Mark Hubbart Date: 2004-05-13T06:22:07+09:00 Subject: Re: Major Addition Bug? On May 12, 2004, at 12:23 PM, Mohammad Khan wrote: > I guess, you guys are missing the point, > > in real life you can't have exact answer of 1/3 + 2.3 + 1.3 Oh, but you can! you just need to choose an appropriate radix. Radix 30 will do: 1/3 + 2.3 + 1.3 becomes: 0.a + 2.9 + 1.9 = 3.s Your answer is 3.s radix 30. This translates to approximately 3.93333 radix ten (decimal); or about 11.11101 radix 2 (binary). In real life, number stay fractions. Decimal notation is only precise for numbers whose denominators factor out to twos and fives. Binary (and hence floating point arithmetic) is only precise for fractions whose denominator is factorable into twos. So unless your decimal number ends in .25, .125, and so on, you're out of luck. > but you can have exact answer of 625.91 + 900.00 + 22.00 Only when using base ten, which computers usually don't. cheers, --Mark