| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
* tests/test-strtod.c (main): Avoid link dependence on fabs.
Reported by Dennis Clarke <blastwave@gmail.com>.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
| |
|
|
|
|
| |
* tests/test-strtod.c (main): Use fabs, not narrowing-to-int "abs".
|
| |
|
| |
|
|
|
|
|
|
|
| |
* tests/test-strtod.c (main): s/FLT_/DBL_/ for minimum and epsilon
values to be the right type.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
|
|
|
|
| |
1 ulp of (double)1.0 is DBL_EPSILON, not FLT_EPSILON.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
|
|
|
|
|
|
|
| |
* tests/test-strtod.c (main): Allow 1-ulp error on expected
fractional results. While not as nice from a QoI perspective, it
is a quicker patch than correctly implementing decimal to binary
rounding.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
| |
|
| |
|
| |
|
|
|
|
|
| |
* tests/test-strtod.c (main): Rather, compare only their
zero/non-zero nature.
|
| |
|
|
|
|
| |
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
|
|
|
|
|
|
|
|
| |
* tests/test-strtod.c (main): Ignore tests for signbit on NaN, and
sign of negative underflow, for now. Use .5, not .1.
* doc/posix-functions/strtod.texi (strtod): Mention these
limitations.
Reported by Jim Meyering.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
|
|
|
|
|
|
|
|
|
|
| |
* modules/strtod (Depends-on): Add c-ctype.
(Link): Mention POW_LIB.
* lib/strtod.c (strtod): Recognize hex floats. Don't allow
whitespace between 'e' and exponent.
* tests/test-strtod.c (main): Enable hex float tests.
* doc/posix-functions/strtod.texi (strtod): Document what gnulib
now provides.
Signed-off-by: Eric Blake <ebb9@byu.net>
|
|
* doc/posix-functions/strtod.texi (strtod): Document bugs with
"-0x", "inf", "nan", and hex constants.
* doc/posix-functions/atof.texi (atof): Likewise.
* modules/stdlib (Makefile.am): Support strtod.
* m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Likewise.
* m4/strtod.m4 (gl_FUNC_STRTOD): Fit in stdlib framework, and
detect additional strtod bugs.
* lib/stdlib.in.h (rpl_strtod): Add declarations.
* lib/strtod.c (strtod): Return -0.0 on negative underflow. Use
bool where appropriate. Parse 'inf' and 'nan'.
* tests/test-strtod.c: New file.
* modules/strtod (Depends-on): Add stdbool, stdlib.
(configure.ac): Turn on module indicator.
* modules/strtod-tests: New module.
Signed-off-by: Eric Blake <ebb9@byu.net>
|