Message107923
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. |
|
Date |
User |
Action |
Args |
2010-06-16 14:00:48 | mark.dickinson | set | recipients:
+ mark.dickinson, eric.smith |
2010-06-16 14:00:48 | mark.dickinson | set | messageid: <1276696848.05.0.800225334902.issue9009@psf.upfronthosting.co.za> |
2010-06-16 14:00:46 | mark.dickinson | link | issue9009 messages |
2010-06-16 14:00:45 | mark.dickinson | create | |
|