🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #10964

Re: integer distance or sqrt

#10964
From: Robert Firth
Date: Mon, 16 Nov 1992 17:26
14 lines
851 bytes
In article <1992Nov16.110102.17077@imada.ou.dk> breese@monet.imada.ou.dk (Bjoern Reese) writes:

>Heron(x)   {Fast integer squareroot routine}
>   IF x <= 64 THEN
>      y = 2 + (x >> 3)  {shift right 3 times}
>   ELSE
    ...
>   ENDIF
>   root := (y + x DIV y) >> 1
>
>This algorithm is faster than Newton's Method...

Maybe so, but Newton's method doesn't tell you that the square
root of 0 is 1.
Technical Details
Message-ID: <1992Nov16.172604.4947@sei.cmu.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!ukma!wupost!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!news.sei.cmu.edu!firth
References: <CLIFFC.92Nov15184340@miranda.rice.edu> <1992Nov16.110102.17077@imada.ou.dk>

Show Full Headers
Complete Article Headers
Newsgroups: comp.arch
Path: arc1-ca.pugleaf.net!sparky!uunet!ukma!wupost!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!news.sei.cmu.edu!firth
From: firth@sei.cmu.edu (Robert Firth)
Subject: Re: integer distance or sqrt
Message-ID: <1992Nov16.172604.4947@sei.cmu.edu>
Organization: Software Engineering Institute
References: <CLIFFC.92Nov15184340@miranda.rice.edu> <1992Nov16.110102.17077@imada.ou.dk>
Date: Mon, 16 Nov 1992 17:26:04 GMT
Lines: 14