Reputation: 41785
(Pdb) int(math.pow(10, num_digits))
100000000000000005366162204393472
(Pdb) num_digits
32
When num_digits are big numbers, something is messed up..
Upvotes: 0
Views: 581
Reputation: 753
If you want pow with integers use **
n**32
math.pow uses a float
an explanation about the implementation can be found here : How did Python implement the built-in function pow()?
Upvotes: 1