I am working with python and I am trying to find powers of really large numbers but something interesting which happens is that this throws a math overflow
math.pow(1000, 1000)
but this below seems to work although I do not know if the value returned is correct
1000**1000
Anybody aware why this happens
Unlike the built-in
**
operator,math.pow()
converts both its arguments to typefloat
. Use**
or the built-inpow()
function for computing exact integer powers.