Marius Vollmer writes: > > (sqrt 4) => 2 (exact) > > I'm not sure whether exact square roots are imortant: they will only > be useful when both the numerator and denominator are squares of > integers and those pairs will be rare, I'd say. I'd wondered if some sort of isqrt or isqrt+remainder would be of more value to those wanting integer roots. (Though I'm aware r5rs says exact results for exact perfect squares is desirable.) > We could use GMP for > computing bignum square roots... Rob mentioned this to me at one stage, I actually started on an attempt at it. Code below, which might sort of work, maybe. One concern though is to ensure the root calculated is the same for a "double" input (which uses sqrt()) as compared to some bignum root (using gmp + conversions).