Message385932
-17/3 = -5.666666666666667 = -6.0 + .333333333333333. It is the latter fraction that gets discarded.
However, this is a frequent source of confusion. How about adding
>>> -17 // 3
-6
>>> -17 % 3
1
>>> -6 * 3 + 1
-17
to illustrate what we mean, without footnote or additional text. |
|
Date |
User |
Action |
Args |
2021-01-29 20:12:45 | terry.reedy | set | recipients:
+ terry.reedy, rhettinger, docs@python, jessevsilverman |
2021-01-29 20:12:45 | terry.reedy | set | messageid: <1611951165.3.0.795290616702.issue43034@roundup.psfhosted.org> |
2021-01-29 20:12:45 | terry.reedy | link | issue43034 messages |
2021-01-29 20:12:45 | terry.reedy | create | |
|