0
(Pdb) int(math.pow(10, num_digits))
100000000000000005366162204393472
(Pdb) num_digits
32

When num_digits are big numbers, something is messed up..

eugene
  • 39,839
  • 68
  • 255
  • 489

1 Answers1

1

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()?

Axeltherabbit
  • 680
  • 3
  • 20