This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients izaakweiss, mark.dickinson, r.david.murray, steven.daprano
Date 2016-07-07.16:27:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1467908874.56.0.0840849270295.issue27463@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-07-07 16:27:54r.david.murraysetrecipients: + r.david.murray, mark.dickinson, steven.daprano, izaakweiss
2016-07-07 16:27:54r.david.murraysetmessageid: <1467908874.56.0.0840849270295.issue27463@psf.upfronthosting.co.za>
2016-07-07 16:27:54r.david.murraylinkissue27463 messages
2016-07-07 16:27:54r.david.murraycreate