Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!aplcen!uakari.primate.wisc.edu!xanth!mcnc!spl From: spl@mcnc.org (Steve Lamont) Newsgroups: comp.graphics Subject: Re: Integral Square Root Message-ID: <5964@alvin.mcnc.org> Date: 31 Dec 89 12:46:09 GMT References: <9170@cbmvax.commodore.com> <21550@mimsy.umd.edu> <9175@cbmvax.commodore.com> Reply-To: spl@mcnc.org.UUCP (Steve Lamont) Organization: Foo Bar Brewers Cooperative Lines: 25 In article <9175@cbmvax.commodore.com> mitchell@cbmvax.commodore.com (Fred Mitchell - PA) writes: >In article <21550@mimsy.umd.edu> chris@mimsy.umd.edu (Chris Torek) writes: >>In article <9170@cbmvax.commodore.com> mitchell@cbmvax.commodore.com >>(Fred Mitchell - PA) writes: >>>Here's one that is short, fast, and sweet. >> >>... and wrong: [...] ... and (apparently) *slower* Here's the result of a test I ran on a VAX: Using Isqrt = 3.277e-05 sec Using sqrt = 1.923e-05 sec This was including the overhead of converting the argument to a double for sqrt() and then converting it back to an int for assignment. spl (the p stands for pretty skeptical) -- Steve Lamont, sciViGuy EMail: spl@ncsc.org NCSC, Box 12732, Research Triangle Park, NC 27709 "Reality involves a square root" Thomas Palmer