Re: How to calculate a square root of an integer fast?



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
.



Relevant Pages

  • Re: Official vs actual carry-on luggage dimensions (USA)
    ... the rule *was* enforced becuse the bag wasn't ... Rollaboard) would have easily fit in the overhead bin. ...  That said, the "standard" should ... airline cannot standardize the rules within their own system, ...
    (rec.travel.air)
  • Re: T2-AE1 barebone - replacing PSU
    ... a normal ATX PSU will not fit inside. ... Standard size ATX is 15cm x 14cm x 8.6 cm. ... Are there even PSUs that size? ... insufficient for a graphics card that requires external power. ...
    (alt.comp.periphs.mainboard.asus)
  • Re: More thoughts on 4E and "D&D"
    ... things may be changed to fit the standard). ... Normalization, OTOH, has to do with causing things to fit into a regular ... want to play a wizard, play a sorcerer, because a wizard is a guy who ... I long ago broke the sorcerer spell list away ...
    (rec.games.frp.dnd)
  • How to calculate a square root of an integer fast?
    ... But I find it is slower than float version of sqrt() in the ... standard C library. ... Can anyone point to me a integer version of square root algorithm which ...
    (sci.math.num-analysis)
  • Re: Deseasonalization and detrending of Keeling curve
    ... fit with a linear gain factor. ... The "fit" is based on a stiff spline ... MODEL STATISTICS AND EQUATION FOR THE CURRENT EQUATION (DETAILS ... Standard Error of the Mean =Standard Dev/ .148530E-01 ...
    (sci.stat.math)