"pow" (power) function

Russ uymqlp502 at sneakemail.com
Thu Mar 16 00:39:59 CET 2006


I have a couple of questions for the number crunchers out there:

Does "pow(x,2)" simply square x, or does it first compute logarithms
(as would be necessary if the exponent were not an integer)?

Does "x**0.5" use the same algorithm as "sqrt(x)", or does it use some
other (perhaps less efficient) algorithm based on logarithms?

Thanks,
Russ




More information about the Python-list mailing list