From 415c4cd7fdb3e8b7476fbb2be2390f4592cf5165 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Tue, 10 Apr 2012 11:52:55 -0400 Subject: new floating point parser/converter 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. --- src/internal/floatscan.h | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/internal/floatscan.h (limited to 'src/internal/floatscan.h') diff --git a/src/internal/floatscan.h b/src/internal/floatscan.h new file mode 100644 index 00000000..5ea74cc9 --- /dev/null +++ b/src/internal/floatscan.h @@ -0,0 +1,8 @@ +#ifndef FLOATSCAN_H +#define FLOATSCAN_H + +#include + +long double __floatscan(FILE *, int, int, int, off_t *); + +#endif -- cgit v1.2.1