From: "Michael W. Ryder" <_mwryder@...> Date: 2008-05-28T05:39:16+09:00 Subject: Re: Why doesn't Float() work the same as Integer()? Mark Wilden wrote: > On May 27, 2008, at 11:24 AM, Michael W. Ryder wrote: > >> If all arithmetic on a computer was done using something like BCD >> there would not be this problem > > How would you exactly represent 1/3 in BCD? > > ///ark > The same way that the current binary system represents the number or numbers like pi, as an approximation. My point was that .1 is a real number that can be accurately represented fairly simply using something like BCD or rational numbers without having to worry about the approximations and the corrections necessary in the current representation. My module to represent rational numbers will convert decimal numbers to rationals without having to worry that it isn't IEEE format. I am not worried that it isn't "correct" according to Computer Science thinking as the program is for my learning. I think we can agree that 1/3 * 9 = 3 exactly, not some approximation.