R. David Murray added the comment:

I see Steven beat me to posting, but I'll post this anyway since it addresses 
the existing documentation.

Those are already documented as being two different operations.  // is "floor" 
in the sense (as documented in 
https://docs.python.org/3/reference/expressions.html#binary-arithmetic-operations):

    x == (x//y) + (x%y)

or, more clearly,

    divmod(x, y) = (x//y, x%y)

math.floor(x/y), on the other hand, is doing the floating point division first, 
and then taking the floor.  Different operations, and thus, given floating 
point realities, different results are not surprising (at least to me...maybe 
I'm naive? :)

Is this worth an additional documentation note of some sort?  I'm not sure, 
I'll defer to Mark.

----------
nosy: +mark.dickinson, r.david.murray

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27463>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to