diff options
Diffstat (limited to 'src/stdlib/strtod.c')
| -rw-r--r-- | src/stdlib/strtod.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/stdlib/strtod.c b/src/stdlib/strtod.c index 4420b02e..ba6c9636 100644 --- a/src/stdlib/strtod.c +++ b/src/stdlib/strtod.c @@ -1,18 +1,23 @@ #include <stdlib.h> +#include "ctype.h" #include "errno.h" +#include "float.h" +#include "math.h" /** convert string to floating-point **/ double strtod(const char * restrict nptr, char ** restrict endptr) { - (void)nptr; (void)endptr; - /* TODO */ + double ret = 0.0; + double max = DBL_MAX; + double min = DBL_MIN; + double inf = INFINITY; + double nan = NAN; + double huge = HUGE_VAL; - if (0) { - errno = ERANGE; /* converted value out of range */ - } + #include "_strtod.h" - return 0.0; + return ret; } /*** |
