I need a *fast* integer sqrt()

From: Gavin Thomas Nicol <nick_at_nospam.org>
Date: Wed Sep 29 1993 - 01:56:18 PDT

Does anyone have one? If possible, it should be small an simple enough
that I could include it into the body of a function. It should work
with values of up to 0xffffffff if possible, though one which could
handle values of up to 0xfffff would be nice. Negative numbers need
not be considered.

(I need this to do a fast tile fill of a circle, and I'm not happy
with the performance of what I came up with... I do it by a divsion by
2, then a loop calculating, and subtracting a delta. I feel there
should be some way of exploiting the bit patterns in integers, but I
can't see *how*.)

nick
Received on Wed Sep 29 02:32:41 1993

This archive was generated by hypermail 2.1.8 : Wed Sep 21 2005 - 19:37:12 PDT