Re: How to calculate a square root of an integer fast?
- From: Thomas Baruchel <archaiesteron@xxxxxxxxxxx>
- Date: 04 Jun 2005 17:44:07 GMT
Le 04-06-2005, xgl99@xxxxxxxxxxxxxxxxxxxxx a écrit :
> I am now using an algorithm here
> http://astronomy.swin.edu.au/~pbourke/analysis/sqrt/
> But I find it is slower than float version of sqrt() in the
> standard C library.
Hi, if your numbers can fit in a C double, why do you want to
avoid the standard library ? Remember that computing with multiple
precision numbers is not as slow as you may think, but if you really
want to use integers, why not implement the Newton-Raphson algorithm
which may be good for integers too ?
Regards,
--
Thomas Baruchel
.
- References:
- Prev by Date: How to calculate a square root of an integer fast?
- Next by Date: Re: How to calculate a square root of an integer fast?
- Previous by thread: How to calculate a square root of an integer fast?
- Next by thread: Re: How to calculate a square root of an integer fast?
- Index(es):
Relevant Pages
|