Wednesday, October 5, 2016

In Python 2.7, math.sqrt(x) is slower than x**0.5

Hi,

Today I have found that using math.sqrt(x) generally take a longer period of time than x**0.5 to get a result. I was using Python 2.7 on Windows 7 with CPU i5 5200u coupled with 8GB of RAM to produce the claim. I am curious that this may vary with machines. If you have a few minutes, please try yours and let me know how it was.

Thanks,
Saran