summaryrefslogtreecommitdiff
path: root/src/stdlib/strtod.c
AgeCommit message (Collapse)AuthorFilesLines
2012-04-10add "scan helper getc" and rework strtod, etc. to use itRich Felker1-2/+4
the immediate benefit is a significant debloating of the float parsing code by moving the responsibility for keeping track of the number of characters read to a different module. by linking shgetc with the stdio buffer logic, counting logic is defered to buffer refill time, keeping the calls to shgetc fast and light. in the future, shgetc will also be useful for integrating the new float code with scanf, which needs to not only count the characters consumed, but also limit the number of characters read based on field width specifiers. shgetc may also become a useful tool for simplifying the integer parsing code.
2012-04-10unify strtof/strtod/strtold wrappers and fix initial whitespace issueRich Felker1-4/+21
2012-04-10new floating point parser/converterRich Felker1-1/+10
this version is intended to be fully conformant to the ISO C, POSIX, and IEEE standards for conversion of decimal/hex floating point strings to float, double, and long double (ld64 or ld80 only at present) values. in particular, all results are intended to be rounded correctly according to the current rounding mode. further, this implementation aims to set the floating point underflow, overflow, and inexact flags to reflect the conversion performed. a moderate amount of testing has been performed (by nsz and myself) prior to integration of the code in musl, but it still may have bugs. so far, only strto(d|ld|f) use the new code. scanf integration will be done as a separate commit, and i will add implementations of the wide character functions later.
2011-02-12initial check-in, version 0.5.0v0.5.0Rich Felker1-0/+6