Advertisement

square root functions

Started by February 13, 2002 06:08 AM
-1 comments, last by Gamekeeper 23 years ago
I was experimenting around a little with making my own square root functions and testing them. Of course I didn't want to spend time on making the fast so this is what they looked like:
    
inline float sqrf(float a) {return pow(10, log(a)/2);}
inline float sqr3(float a) {return pow(a, 0.5);}
    
the times I got when testing them were something like this for 10000 calculations: sqrt (no mine): 0.004 sqrf: 0.02 sqr3: 0.01
Message from above: Damn, my hair is grey! (I changed the title of the thread to be meaningful - GSR.) Edited by - grhodes_at_work on February 22, 2002 3:32:25 PM
Message from above:Damn, my hair is grey!

This topic is closed to new replies.

Advertisement