[New-bugs-announce] [issue30453] str.format() method, Rounding off wrong

Kazuhiro Fujie report at bugs.python.org
Wed May 24 05:45:38 EDT 2017


New submission from Kazuhiro Fujie:

To whom it may concern:

I post issue at first time.
Please forgive me if this is rude

C:\Users\kudo-shunsaku>python
Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 18:41:36) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> num = 4.625
>>> "{:.2f}".format(num)
'4.62'
>>> num = 4.645
>>> "{:.2f}".format(num)
'4.64'
>>> num = 4.655
>>> "{:.2f}".format(num)
'4.66'
>>>

Please, check this out.
 I checked it version 3.5.3 and 3.6.1 on Windows and Cent OS.

----------
components: Build
messages: 294340
nosy: kudoshunsaku
priority: normal
severity: normal
status: open
title: str.format() method, Rounding off wrong
type: behavior
versions: Python 3.5, Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30453>
_______________________________________


More information about the New-bugs-announce mailing list