[Haskell-cafe] Fractional sqrt
Yitzchak Gale
gale at sefer.org
Sun Jan 21 06:30:45 EST 2007
Henning Thielemann wrote:
> Certainly no surprise - there is already an implementation of continued
> fractions for approximation of roots and transcendent functions by Jan
> Skibinski:
> http://darcs.haskell.org/numeric-quest/Fraction.hs
Wow, nice. Now - how was I supposed to have found that?
It has been know at least since early Knuth that continued
fractions are the best approximation to rationals (in a certain
sense).
It is too bad that Data.Ratio took the idea of "simplest fraction"
from Scheme for the approxRational function.
I wrote my own replacement using continued fractions.
Now I see that I have reinvented several wheels.
Thanks,
Yitz
More information about the Haskell-Cafe
mailing list