Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » sci.math.* » sci.math.independent

Topic: Root
Replies: 21   Last Post: Jul 14, 1999 3:46 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
John Popelish

Posts: 37
Registered: 12/8/04
Re: Root (EXACT Square Root Algorithm)
Posted: Jul 12, 1999 4:45 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply



Gareth McCaughan wrote:
>
> Thomas Chrapkiewicz wrote:
>

> > This method for square roots is EXACT for the number of digits that you have
> > the patience to use it to.

> [SNIP]
>
> It might be worth mentioning that this algorithm works especially
> nicely in binary.
>
> If you can do division efficiently, another possibility is to use
> Newton's method (though I think this particular application of it
> goes back to before Newton): start with any half-decent guess at
> the square root and iterate x -> (x+a/x)/2 where a is the thing
> whose square root you want.


AsI recall, I once coded a fast Newton's method square root algorithm
that minimized the number of iterations required by referring to a 256
entry lookup table of guesses, and used the most significant 8 bits as
pointer. There was a little more to it than that, but a good guess can
shorten things considerably.

John Popelish







Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2013. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.