0

When I put in 1 / 10 ** -5 I'm getting 99999.9999999999 rather than 100000, which is what I should get. Can anyone explain why it does that?

Josh Sroka
  • 53
  • 1
  • 6
  • See also [this question on Python division in versions 3.x](https://stackoverflow.com/questions/2958684/python-division). – Mihai Chelaru May 28 '20 at 15:43
  • `float` can't keep all values so it keeps some aproximation - and this why `0.1 + 0.2 == 0.3` gives `False` but we expect `True`. – furas May 28 '20 at 15:54

0 Answers0