0

pow(10, 70) vs math.pow(10, 70) whats the difference?

Is there any difference then using the math module to calculate pow()? Should I Import math to use pow()?

18th Aug 2016, 8:36 AM
Elias Grube
Elias Grube - avatar
1 Réponse
+ 1
According to official docs: "Unlike the built-in ** operator, math.pow()converts both its arguments to type float. Use** or the built-in pow() function for computing exact integer powers." https://docs.python.org/3/library/math.html
18th Aug 2016, 1:30 PM
Textobot
Textobot - avatar