[issue9980] str(float) failure

Stefan Krah report at bugs.python.org
Thu Sep 30 14:14:28 CEST 2010


Stefan Krah <stefan-usenet at bytereef.org> added the comment:

The tracker swallowed some parts of my mail:

In general, execution times for _Py_dg_dtoa vary quite a bit depending on
the number that is converted:

>>> s = "str(1.00000000000000005e300)"
>>> t = timeit.Timer(stmt=s)
>>> t.timeit(number=10000000)
5.097490072250366

>>> s = "str(1.00000000000000005e384)"
>>> t = timeit.Timer(stmt=s)
>>> t.timeit(number=10000000)
2.417008876800537

----------

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


More information about the Python-bugs-list mailing list