[issue26223] decimal.to_eng_string() does not implement engineering notation in all cases.

Antti Haapala report at bugs.python.org
Thu Aug 11 05:17:10 EDT 2016


Antti Haapala added the comment:

Ok, after reading the "spec" it seems that the engineering exponent is indeed printed for positive exponents *if* the precision of the number is less than the digits of the exponent, which I didn't realize that I should be testing. 

However the *precision* of decimals is meaningless anyhow. Add a very precisely measured '0e0' to any number and the sum also has exponent of 0, and is thus never displayed in exponential notation.

----------

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


More information about the Python-bugs-list mailing list