New submission from Sep Dehpour <[email protected]>:
Floats and Decimals have inconsistent exponent notation formatting:
>>> '{:.5e}'.format(Decimal('2.0001'))
'2.00010e+0'
>>> '{:.5e}'.format(2.0001)
'2.00010e+00'
This is causing issues for us since we use the scientific notation formatted
string of numbers to compare them. Between decimals and floats, one produces
'+0' while the other one produces '+00'
----------
messages: 340136
nosy: seperman
priority: normal
severity: normal
status: open
title: Inconsistent exponent notation formatting
type: behavior
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue36622>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com