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 wolma
Recipients belopolsky, facundobatista, mark.dickinson, rhettinger, serhiy.storchaka, skrah, stutzbach, wolma
Date 2017-11-09.08:21:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1510215668.8.0.213398074469.issue31978@psf.upfronthosting.co.za>
In-reply-to
Content
> (E.g., if both `a` and `b` are not-too-large integers, `round(a / b)` is still "safe" in that it will give the same result as if a non-lossy integer division is used.)

Well, it does not take particularly large a and b to break round's tie-breaking through rounding-to-even though:

>>> for x in range(1,501):
        for y in range(1,501):
            if round(x/y, 1) != float(round(F(x,y), 1)):
                print(x,y)

1 20
2 40
3 20
3 60
4 80
5 100
6 40
6 120
7 20
7 140
8 160
9 20
9 60
9 180
10 200
11 220
12 80
12 240
13 20
13 260
14 40
14 280
15 100
15 300
16 320
17 340
18 40
18 120
18 360
19 20
19 380
20 400
21 20
21 60
21 140
21 420
22 440
23 20
23 460
24 160
24 480
25 500

...
History
Date User Action Args
2017-11-09 08:21:08wolmasetrecipients: + wolma, rhettinger, facundobatista, mark.dickinson, belopolsky, stutzbach, skrah, serhiy.storchaka
2017-11-09 08:21:08wolmasetmessageid: <1510215668.8.0.213398074469.issue31978@psf.upfronthosting.co.za>
2017-11-09 08:21:08wolmalinkissue31978 messages
2017-11-09 08:21:08wolmacreate