New submission from Mark Dickinson <dicki...@gmail.com>: I've opened this issue to track efforts to improve the quality of the Python/dtoa.c file, which provides Python's string-to-float and float-to-string conversions.
Particular issues in mind (non-exhaustive): - do a thorough review and test of _Py_dg_dtoa; this has already been done for _Py_dg_strtod (issue 7632, issue 7743), and uncovered several problems, including a memory leak, some asserts that were triggered in debug mode, and many cases of wrong output. - break out the parsing code from _Py_dg_strtod into a separate function, for clarity and maintainability (and possible re-use of the parsing code itself) - improve _Py_dg_strtod tests, by using contined-fractions to generate and test particularly difficult cases. - _Py_dg_strtod silently gives wrong results for huge inputs; while not particular serious, this is easily avoidable. - improve API to rely on errno less. - some pieces of code are currently unused; improve code coverage and tests to identify thoses pieces and remove them. - the current code is convoluted in places and hard to explain; at least some extra comments should be added. - try to make Python/dtoa.c as Python-agnostic as possible, so that the code can be reused in other projects where desired. ---------- assignee: mark.dickinson components: Interpreter Core messages: 107923 nosy: eric.smith, mark.dickinson priority: normal severity: normal status: open title: Improve quality of Python/dtoa.c versions: Python 3.2 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9009> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com