0

For example, for small numbers its basically the same

>>> 2*5//3
3
>>> int(2*5/3)
3

But for large numbers,

>>> int(3814986502092304*122/32)
14544636039226908
>>> 3814986502092304*122//32
14544636039226909
sshashank124
  • 31,495
  • 9
  • 67
  • 76
  • 1
    See also: https://stackoverflow.com/questions/1535596/what-is-the-reason-for-having-in-python – sshashank124 Jan 14 '20 at 16:36
  • 1
    See also: https://stackoverflow.com/questions/183853/what-is-the-difference-between-and-when-used-for-division – sshashank124 Jan 14 '20 at 16:37
  • 1
    See also: https://stackoverflow.com/questions/14444520/two-forward-slashes-in-python – sshashank124 Jan 14 '20 at 16:38
  • I understand that // does floor division (or integer division). My question is that if it's just flooring the result of division, then how is it different from taking the integer part of the rational division (/). The answers should be the same regardless of what I use. – Shrey Gupta Jan 15 '20 at 08:22
  • Floating-point inaccuracies when representation large numbers – sshashank124 Jan 15 '20 at 08:27

0 Answers0