homepage

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 pitrou
Recipients mark.dickinson, pitrou, tim.peters
Date 2015年09月15日.17:28:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1442338083.45.0.230324673027.issue25129@psf.upfronthosting.co.za>
In-reply-to
Content
>>> (78*6e-8) / 6e-8
78.0
>>> (78*6e-8) // 6e-8
77.0
Note this doesn't make divmod() wrong:
>>> q, r = divmod(78*6e-8, 6e-8)
>>> q, r
(77.0, 5.999999999999965e-08)
>>> r < 6e-8
True
>>> q * 6e-8 + r == 78*6e-8
True
But, still, it is somewhat of an oddity to not return the real quotient when it is an exact integer.
Note this came from a Numpy issue where Numpy actually shows better behaviour:
https://github.com/numpy/numpy/issues/6127 
History
Date User Action Args
2015年09月15日 17:28:03pitrousetrecipients: + pitrou, tim.peters, mark.dickinson
2015年09月15日 17:28:03pitrousetmessageid: <1442338083.45.0.230324673027.issue25129@psf.upfronthosting.co.za>
2015年09月15日 17:28:03pitroulinkissue25129 messages
2015年09月15日 17:28:02pitroucreate

AltStyle によって変換されたページ (->オリジナル) /