diff options
author | Eric Blake <ebb9@byu.net> | 2008-03-31 20:56:25 -0600 |
---|---|---|
committer | Eric Blake <ebb9@byu.net> | 2008-03-31 21:06:57 -0600 |
commit | 06945b7c073c0872ec2049c0e0b94f789bf8d77e (patch) | |
tree | 6f724a69d7601b1df626fba02e974a3455c68abd /tests/test-trunc1.c | |
parent | 4dd6fc750dfb7f21b2b764737c0656694281ed19 (diff) | |
download | gnulib-06945b7c073c0872ec2049c0e0b94f789bf8d77e.tar.gz |
Guarantee a definition of NAN.
* lib/math.in.h (NAN): Define if missing.
* tests/test-math.c (main): Test it.
* doc/posix-headers/math.texi (math.h): Document this.
* lib/isnan.c (rpl_isnand): Use it.
* tests/test-ceilf1.c (NaN): Delete, and use NAN instead.
* tests/test-floorf1.c (NaN): Likewise.
* tests/test-frexp.c (NaN): Likewise.
* tests/test-isnand.c (NaN): Likewise.
* tests/test-isnanf.c (NaN): Likewise.
* tests/test-round1.c (NaN): Likewise.
* tests/test-roundf1.c (NaN): Likewise.
* tests/test-snprintf-posix.h (NaN): Likewise.
* tests/test-sprintf-posix.h (NaN): Likewise.
* tests/test-trunc1.c (NaN): Likewise.
* tests/test-truncf1.c (NaN): Likewise.
* tests/test-vasnprintf-posix.c (NaN): Likewise.
* tests/test-vasprintf-posix.c (NaN): Likewise.
* modules/isnand-nolibm (Depends-on): Add math.
* modules/isnanf-nolibm (Depends-on): Likewise.
* modules/isnanl (Depends-on): Likewise.
* modules/isnanl-nolibm (Depends-on): Likewise.
* modules/snprintf-posix-tests (Depends-on): Likewise.
* modules/sprintf-posix-tests (Depends-on): Likewise.
* modules/vsnprintf-posix-tests (Depends-on): Likewise.
* modules/vsprintf-posix-tests (Depends-on): Likewise.
* modules/vasnprintf-posix-tests (Depends-on): Likewise.
* modules/vasprintf-posix-tests (Depends-on): Likewise.
Signed-off-by: Eric Blake <ebb9@byu.net>
Diffstat (limited to 'tests/test-trunc1.c')
-rw-r--r-- | tests/test-trunc1.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/tests/test-trunc1.c b/tests/test-trunc1.c index a2d6dd4b4a..6b283636e4 100644 --- a/tests/test-trunc1.c +++ b/tests/test-trunc1.c @@ -36,18 +36,6 @@ } \ while (0) -/* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */ -#ifdef __DECC -static double -NaN () -{ - static double zero = 0.0; - return zero / zero; -} -#else -# define NaN() (0.0 / 0.0) -#endif - int main () { @@ -78,7 +66,7 @@ main () ASSERT (trunc (1.0 / 0.0) == 1.0 / 0.0); ASSERT (trunc (-1.0 / 0.0) == -1.0 / 0.0); /* NaNs. */ - ASSERT (isnand (trunc (NaN ()))); + ASSERT (isnand (trunc (NAN))); return 0; } |