Message250786
| 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:03 | pitrou | set | recipients:
+ pitrou, tim.peters, mark.dickinson |
| 2015年09月15日 17:28:03 | pitrou | set | messageid: <1442338083.45.0.230324673027.issue25129@psf.upfronthosting.co.za> |
| 2015年09月15日 17:28:03 | pitrou | link | issue25129 messages |
| 2015年09月15日 17:28:02 | pitrou | create |
|