Author izaakweiss
Recipients izaakweiss
Date 2016-07-07.16:07:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1467907647.78.0.993210644564.issue27463@psf.upfronthosting.co.za>
In-reply-to
Content
The floor division operator in Python 3 `x//y` acts differently than the floor of the division operator `math.floor(x/y)` in some edge cases due to floating point errors.

Consider `44//4.4` and `math.floor(44/4.4)`. These two expressions should, with infinite precision, evaluate to the same number. However, in practice `44//4.4` evaluates to `9.0`, but `math.floor(44/4.4)` evaluates to `10.0`.

This should either be changed, or made clear in the documentation that the two may not be equal due to floating point errors.
History
Date User Action Args
2016-07-07 16:07:27izaakweisssetrecipients: + izaakweiss
2016-07-07 16:07:27izaakweisssetmessageid: <1467907647.78.0.993210644564.issue27463@psf.upfronthosting.co.za>
2016-07-07 16:07:27izaakweisslinkissue27463 messages
2016-07-07 16:07:27izaakweisscreate