Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

inverse square root in Python [closed]

Does any Python library offer a function that implements the "fast inverse square root" algorithm described in following link? http://en.wikipedia.org/wiki/Fast_inverse_square_root Perhaps numpy/SciPy?

like image 597
Andreas Gschossmann Avatar asked Jul 25 '26 06:07

Andreas Gschossmann


1 Answers

You can do this in Python, but not in a very direct way (ie. lots of function calls), so doing x**-.5 will likely be much faster.

So it might be an interesting exercise, but not practical at all.

like image 59
John La Rooy Avatar answered Jul 28 '26 00:07

John La Rooy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!