[issue32956] python 3 round bug

M Hsia report at bugs.python.org
Mon Feb 26 10:23:55 EST 2018


New submission from M Hsia <minslac at yahoo.com>:

import sys
print(sys.version)

for i in range(10):
    test=i+0.5
    print (test,round(test,0))
----------------------------
3.6.3 |Anaconda custom (64-bit)| (default, Nov  8 2017, 15:10:56) [MSC v.1900 64 bit (AMD64)]
0.5 0.0
1.5 2.0
2.5 2.0
3.5 4.0
4.5 4.0
5.5 6.0
6.5 6.0
7.5 8.0
8.5 8.0
9.5 10.0
-------------------------
2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)]
(0.5, 1.0)
(1.5, 2.0)
(2.5, 3.0)
(3.5, 4.0)
(4.5, 5.0)
(5.5, 6.0)
(6.5, 7.0)
(7.5, 8.0)
(8.5, 9.0)
(9.5, 10.0)

----------
messages: 312931
nosy: MJH
priority: normal
severity: normal
status: open
title: python 3 round bug
type: behavior
versions: Python 3.4, Python 3.5, Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32956>
_______________________________________


More information about the Python-bugs-list mailing list