[Haskell-cafe] Fractional sqrt

ajb at spamcop.net ajb at spamcop.net
Sat Jan 20 09:46:03 EST 2007

G'day all.

I said:

> I've also extended the range for approxSmallSqrt here from (0,255) to
> (0,271).  It is left as an exercise as to why this might be a good idea.
> (Hint: 272 is approximately 16.5*16.5.)

The correct answer, for those playing at home, is it's because it WAS a
good idea when I wrote the code for integer square roots.  Mindlessly
cutting and pasting it into code for fractions makes it not such a good

Andrew Bromage

More information about the Haskell-Cafe mailing list