News for hackers. Stuff that matters.
Re:Low Level Bit Hacks You Absolutely Must Know by bakery2k on Friday May 11, 2018 @09:40AM (#17047207)
Guido has written a blog post explaining "Why Python's Integer Division Floors" [1].

Python also uses floor division, and the corresponding "sign-of-modulo matches sign-of-divisor", for floating-point numbers. The blog post claims that this can be problematic in certain cases (compared to C's "sign-of-modulo matches sign-of-dividend"), but does not give any concrete examples.

[1] http://python-history.blogspot.com.au/2010/08/why-pythons-in...

There are no comments on this comment yet.