Pow for faster exponentiation

suggest change

math.pow always converts its arguments to float and returns a float. It is not a faster or more exact substitute for ** on integers. For modular exponentiation, use the three-argument built-in pow(base, exp, mod).

from math import pow
pow(5, 5)  # 3125.0
5 ** 5     # 3125

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents