
On 10/29/06 3:23 PM, "Jason Hise" <0xchaos@gmail.com> wrote:
On 10/29/06, Daryle Walker <darylew@hotmail.com> wrote:
Couldn't there be better approximate fractions to use?
I'm not sure if there were other questions implied by the ommited portions of your post, but my best guess is that you are looking for an algorithm which builds a good fit rational number from a float without resorting to a simple and inefficient decimal truncation. If this is what you are looking for then what might work is a function which builds a rational number as a continued fraction. [TRUNCATE description of the building algorithm]
Actually, the question was rhetorical. I already found, using various web calculators, better approximate fractions that could be used instead of the "crude" 301/1000 or 30103/100000. I was suggesting that we could use one of those "better" fractions instead. -- Daryle Walker Mac, Internet, and Video Game Junkie darylew AT hotmail DOT com