summaryrefslogtreecommitdiff
path: root/tests/test-strtod.c
Commit message (Collapse)AuthorAgeFilesLines
* Work around bug of HP-UX 10.20 cc with -0.0 literal.Bruno Haible2008-08-011-4/+8
|
* test-strtod: allow compilation without -lmEric Blake2008-07-301-2/+5
| | | | | | | * 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>
* Rename isnand.h to isnand-nolibm.h, similarly for isnanf.h.Ben Pfaff2008-07-121-1/+1
|
* test-strtod: fix typos: s/abs/fabs/Jim Meyering2008-04-141-2/+2
| | | | * tests/test-strtod.c (main): Use fabs, not narrowing-to-int "abs".
* Fix link failure on Solaris 10/x86 with gcc.Bruno Haible2008-04-121-9/+11
|
* Flush the standard error stream before aborting.Bruno Haible2008-04-111-0/+1
|
* Fix typos.Eric Blake2008-04-011-3/+3
| | | | | | | * 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>
* Fix typo.Eric Blake2008-04-011-2/+2
| | | | | | 1 ulp of (double)1.0 is DBL_EPSILON, not FLT_EPSILON. Signed-off-by: Eric Blake <ebb9@byu.net>
* For now, cater to gnulib strtod inaccuracies.Eric Blake2008-04-011-2/+8
| | | | | | | | | * 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>
* Update test results on OSF/1.Bruno Haible2008-04-011-4/+4
|
* Convert from C99 syntax to C89 syntax.Bruno Haible2008-04-011-131/+196
|
* Assume NaNs exist; don't test the NAN macro.Bruno Haible2008-04-011-5/+5
|
* Don't compare actual signbit return values.Jim Meyering2008-03-311-8/+8
| | | | | * tests/test-strtod.c (main): Rather, compare only their zero/non-zero nature.
* Add info about many more platforms.Bruno Haible2008-03-311-70/+70
|
* Fix typo in last patch.Eric Blake2008-03-301-2/+2
| | | | Signed-off-by: Eric Blake <ebb9@byu.net>
* More strtod touchups.Eric Blake2008-03-301-6/+24
| | | | | | | | | | * 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>
* Add hex float support.Eric Blake2008-03-291-3/+9
| | | | | | | | | | | | * 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>
* Document various strtod bugs, with some fixes.Eric Blake2008-03-291-0/+822
* 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>