# HG changeset patch # User Ben Pfaff # Date 1215884494 25200 # Node ID ebb7ea0c94e8506d2e1b90f3a0576412f5bc9e8f # Parent 0c43a5e428db21c0727b03e4120c92a79055b689 Rename isnand.h to isnand-nolibm.h, similarly for isnanf.h. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,33 @@ +2008-07-10 Ben Pfaff + + * lib/isnanf.h: Rename lib/isnanf-nolibm.h. + * lib/isnand.h: Rename lib/isnand-nolibm.h. + * tests/test-isnanf.c: Rename tests/test-isnanf-nolibm.c. + * tests/test-isnand.c: Rename tests/test-isnand-nolibm.c. + * modules/isnanf-nolibm: Update references to renamed files. + * modules/isnand-nolibm: Likewise. + * modules/isnanf-nolibm-tests: Likewise. + * modules/isnand-nolibm-tests: Likewise. + * lib/frexp.c: Likewise. + * lib/isfinite.c: Likewise. + * lib/signbitd.c: Likewise. + * lib/signbitf.c: Likewise. + * lib/vasnprintf.c: Likewise. + * tests/test-ceilf1.c: Likewise. + * tests/test-ceilf2.c: Likewise. + * tests/test-floorf1.c: Likewise. + * tests/test-floorf2.c: Likewise. + * tests/test-frexp.c: Likewise. + * tests/test-round1.c: Likewise. + * tests/test-round2.c: Likewise. + * tests/test-roundf1.c: Likewise. + * tests/test-strtod.c: Likewise. + * tests/test-trunc1.c: Likewise. + * tests/test-trunc2.c: Likewise. + * tests/test-truncf1.c: Likewise. + * tests/test-truncf2.c: Likewise. + * NEWS: Mention the renamed header files. + 2008-07-11 Jim Meyering vc-list-files: make the last-resort awk code more portable diff --git a/NEWS b/NEWS --- a/NEWS +++ b/NEWS @@ -6,6 +6,11 @@ Date Modules Changes +2008-07-07 isnanf-nolibm The include file is changed from "isnanf.h" + to "isnanf-nolibm.h". + isnand-nolibm The include file is changed from "isnand.h" + to "isnand-nolibm.h". + 2008-06-10 execute The execute function takes an additional termsigp argument. Passing termsigp = NULL is ok. wait-process The wait_subprocess function takes an additional diff --git a/lib/frexp.c b/lib/frexp.c --- a/lib/frexp.c +++ b/lib/frexp.c @@ -27,7 +27,7 @@ # include "isnanl-nolibm.h" # include "fpucw.h" #else -# include "isnand.h" +# include "isnand-nolibm.h" #endif /* This file assumes FLT_RADIX = 2. If FLT_RADIX is a power of 2 greater diff --git a/lib/isfinite.c b/lib/isfinite.c --- a/lib/isfinite.c +++ b/lib/isfinite.c @@ -19,8 +19,8 @@ #include -#include "isnanf.h" -#include "isnand.h" +#include "isnanf-nolibm.h" +#include "isnand-nolibm.h" #include "isnanl-nolibm.h" int gl_isfinitef (float x) diff --git a/lib/isnand-nolibm.h b/lib/isnand-nolibm.h new file mode 100644 --- /dev/null +++ b/lib/isnand-nolibm.h @@ -0,0 +1,33 @@ +/* Test for NaN that does not need libm. + Copyright (C) 2007-2008 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#if HAVE_ISNAND_IN_LIBC +/* Get declaration of isnan macro. */ +# include +# if __GNUC__ >= 4 + /* GCC 4.0 and newer provides three built-ins for isnan. */ +# undef isnand +# define isnand(x) __builtin_isnan ((double)(x)) +# else +# undef isnand +# define isnand(x) isnan ((double)(x)) +# endif +#else +/* Test whether X is a NaN. */ +# undef isnand +# define isnand rpl_isnand +extern int isnand (double x); +#endif diff --git a/lib/isnand.h b/lib/isnand.h deleted file mode 100644 --- a/lib/isnand.h +++ /dev/null @@ -1,33 +0,0 @@ -/* Test for NaN that does not need libm. - Copyright (C) 2007-2008 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#if HAVE_ISNAND_IN_LIBC -/* Get declaration of isnan macro. */ -# include -# if __GNUC__ >= 4 - /* GCC 4.0 and newer provides three built-ins for isnan. */ -# undef isnand -# define isnand(x) __builtin_isnan ((double)(x)) -# else -# undef isnand -# define isnand(x) isnan ((double)(x)) -# endif -#else -/* Test whether X is a NaN. */ -# undef isnand -# define isnand rpl_isnand -extern int isnand (double x); -#endif diff --git a/lib/isnanf-nolibm.h b/lib/isnanf-nolibm.h new file mode 100644 --- /dev/null +++ b/lib/isnanf-nolibm.h @@ -0,0 +1,33 @@ +/* Test for NaN that does not need libm. + Copyright (C) 2007-2008 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#if HAVE_ISNANF_IN_LIBC +/* Get declaration of isnan macro or (older) isnanf function. */ +# include +# if __GNUC__ >= 4 + /* GCC 4.0 and newer provides three built-ins for isnan. */ +# undef isnanf +# define isnanf(x) __builtin_isnanf ((float)(x)) +# elif defined isnan +# undef isnanf +# define isnanf(x) isnan ((float)(x)) +# endif +#else +/* Test whether X is a NaN. */ +# undef isnanf +# define isnanf rpl_isnanf +extern int isnanf (float x); +#endif diff --git a/lib/isnanf.h b/lib/isnanf.h deleted file mode 100644 --- a/lib/isnanf.h +++ /dev/null @@ -1,33 +0,0 @@ -/* Test for NaN that does not need libm. - Copyright (C) 2007-2008 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#if HAVE_ISNANF_IN_LIBC -/* Get declaration of isnan macro or (older) isnanf function. */ -# include -# if __GNUC__ >= 4 - /* GCC 4.0 and newer provides three built-ins for isnan. */ -# undef isnanf -# define isnanf(x) __builtin_isnanf ((float)(x)) -# elif defined isnan -# undef isnanf -# define isnanf(x) isnan ((float)(x)) -# endif -#else -/* Test whether X is a NaN. */ -# undef isnanf -# define isnanf rpl_isnanf -extern int isnanf (float x); -#endif diff --git a/lib/signbitd.c b/lib/signbitd.c --- a/lib/signbitd.c +++ b/lib/signbitd.c @@ -20,7 +20,7 @@ #include #include -#include "isnand.h" +#include "isnand-nolibm.h" #include "float+.h" #undef gl_signbitd diff --git a/lib/signbitf.c b/lib/signbitf.c --- a/lib/signbitf.c +++ b/lib/signbitf.c @@ -20,7 +20,7 @@ #include #include -#include "isnanf.h" +#include "isnanf-nolibm.h" #include "float+.h" #undef gl_signbitf diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c --- a/lib/vasnprintf.c +++ b/lib/vasnprintf.c @@ -95,7 +95,7 @@ #if (NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL # include -# include "isnand.h" +# include "isnand-nolibm.h" #endif #if (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE) && !defined IN_LIBINTL @@ -106,7 +106,7 @@ #if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL # include -# include "isnand.h" +# include "isnand-nolibm.h" # include "printf-frexp.h" #endif diff --git a/modules/isnand-nolibm b/modules/isnand-nolibm --- a/modules/isnand-nolibm +++ b/modules/isnand-nolibm @@ -2,7 +2,7 @@ isnand() function: test for NaN, without requiring libm. Files: -lib/isnand.h +lib/isnand-nolibm.h lib/isnand.c lib/isnan.c lib/float+.h @@ -17,7 +17,7 @@ Makefile.am: Include: -#include "isnand.h" +#include "isnand-nolibm.h" License: LGPL diff --git a/modules/isnand-nolibm-tests b/modules/isnand-nolibm-tests --- a/modules/isnand-nolibm-tests +++ b/modules/isnand-nolibm-tests @@ -1,5 +1,5 @@ Files: -tests/test-isnand.c +tests/test-isnand-nolibm.c tests/nan.h Depends-on: @@ -8,6 +8,6 @@ gl_DOUBLE_EXPONENT_LOCATION Makefile.am: -TESTS += test-isnand -check_PROGRAMS += test-isnand +TESTS += test-isnand-nolibm +check_PROGRAMS += test-isnand-nolibm diff --git a/modules/isnanf-nolibm b/modules/isnanf-nolibm --- a/modules/isnanf-nolibm +++ b/modules/isnanf-nolibm @@ -2,7 +2,7 @@ isnanf() function: test for NaN, without requiring libm. Files: -lib/isnanf.h +lib/isnanf-nolibm.h lib/isnanf.c lib/isnan.c lib/float+.h @@ -17,7 +17,7 @@ Makefile.am: Include: -#include "isnanf.h" +#include "isnanf-nolibm.h" License: LGPL diff --git a/modules/isnanf-nolibm-tests b/modules/isnanf-nolibm-tests --- a/modules/isnanf-nolibm-tests +++ b/modules/isnanf-nolibm-tests @@ -1,5 +1,5 @@ Files: -tests/test-isnanf.c +tests/test-isnanf-nolibm.c tests/nan.h Depends-on: @@ -8,6 +8,6 @@ gl_FLOAT_EXPONENT_LOCATION Makefile.am: -TESTS += test-isnanf -check_PROGRAMS += test-isnanf +TESTS += test-isnanf-nolibm +check_PROGRAMS += test-isnanf-nolibm diff --git a/tests/test-ceilf1.c b/tests/test-ceilf1.c --- a/tests/test-ceilf1.c +++ b/tests/test-ceilf1.c @@ -23,7 +23,7 @@ #include #include -#include "isnanf.h" +#include "isnanf-nolibm.h" #include "nan.h" #define ASSERT(expr) \ diff --git a/tests/test-ceilf2.c b/tests/test-ceilf2.c --- a/tests/test-ceilf2.c +++ b/tests/test-ceilf2.c @@ -26,7 +26,7 @@ #include #include -#include "isnanf.h" +#include "isnanf-nolibm.h" #define ASSERT(expr) \ do \ diff --git a/tests/test-floorf1.c b/tests/test-floorf1.c --- a/tests/test-floorf1.c +++ b/tests/test-floorf1.c @@ -23,7 +23,7 @@ #include #include -#include "isnanf.h" +#include "isnanf-nolibm.h" #include "nan.h" #define ASSERT(expr) \ diff --git a/tests/test-floorf2.c b/tests/test-floorf2.c --- a/tests/test-floorf2.c +++ b/tests/test-floorf2.c @@ -26,7 +26,7 @@ #include #include -#include "isnanf.h" +#include "isnanf-nolibm.h" #define ASSERT(expr) \ do \ diff --git a/tests/test-frexp.c b/tests/test-frexp.c --- a/tests/test-frexp.c +++ b/tests/test-frexp.c @@ -24,7 +24,7 @@ #include #include -#include "isnand.h" +#include "isnand-nolibm.h" #include "nan.h" /* Avoid some warnings from "gcc -Wshadow". diff --git a/tests/test-isnand-nolibm.c b/tests/test-isnand-nolibm.c new file mode 100644 --- /dev/null +++ b/tests/test-isnand-nolibm.c @@ -0,0 +1,78 @@ +/* Test of isnand() substitute. + Copyright (C) 2007-2008 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2007. */ + +#include + +#include "isnand-nolibm.h" + +#include +#include +#include + +#include "nan.h" + +#define ASSERT(expr) \ + do \ + { \ + if (!(expr)) \ + { \ + fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ + fflush (stderr); \ + abort (); \ + } \ + } \ + while (0) + +int +main () +{ + /* Finite values. */ + ASSERT (!isnand (3.141)); + ASSERT (!isnand (3.141e30)); + ASSERT (!isnand (3.141e-30)); + ASSERT (!isnand (-2.718)); + ASSERT (!isnand (-2.718e30)); + ASSERT (!isnand (-2.718e-30)); + ASSERT (!isnand (0.0)); + ASSERT (!isnand (-0.0)); + /* Infinite values. */ + ASSERT (!isnand (1.0 / 0.0)); + ASSERT (!isnand (-1.0 / 0.0)); + /* Quiet NaN. */ + ASSERT (isnand (NaNd ())); +#if defined DBL_EXPBIT0_WORD && defined DBL_EXPBIT0_BIT + /* Signalling NaN. */ + { + #define NWORDS \ + ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) + typedef union { double value; unsigned int word[NWORDS]; } memory_double; + memory_double m; + m.value = NaNd (); +# if DBL_EXPBIT0_BIT > 0 + m.word[DBL_EXPBIT0_WORD] ^= (unsigned int) 1 << (DBL_EXPBIT0_BIT - 1); +# else + m.word[DBL_EXPBIT0_WORD + (DBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] + ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); +# endif + m.word[DBL_EXPBIT0_WORD + (DBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] + |= (unsigned int) 1 << DBL_EXPBIT0_BIT; + ASSERT (isnand (m.value)); + } +#endif + return 0; +} diff --git a/tests/test-isnand.c b/tests/test-isnand.c deleted file mode 100644 --- a/tests/test-isnand.c +++ /dev/null @@ -1,78 +0,0 @@ -/* Test of isnand() substitute. - Copyright (C) 2007-2008 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Bruno Haible , 2007. */ - -#include - -#include "isnand.h" - -#include -#include -#include - -#include "nan.h" - -#define ASSERT(expr) \ - do \ - { \ - if (!(expr)) \ - { \ - fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ - fflush (stderr); \ - abort (); \ - } \ - } \ - while (0) - -int -main () -{ - /* Finite values. */ - ASSERT (!isnand (3.141)); - ASSERT (!isnand (3.141e30)); - ASSERT (!isnand (3.141e-30)); - ASSERT (!isnand (-2.718)); - ASSERT (!isnand (-2.718e30)); - ASSERT (!isnand (-2.718e-30)); - ASSERT (!isnand (0.0)); - ASSERT (!isnand (-0.0)); - /* Infinite values. */ - ASSERT (!isnand (1.0 / 0.0)); - ASSERT (!isnand (-1.0 / 0.0)); - /* Quiet NaN. */ - ASSERT (isnand (NaNd ())); -#if defined DBL_EXPBIT0_WORD && defined DBL_EXPBIT0_BIT - /* Signalling NaN. */ - { - #define NWORDS \ - ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) - typedef union { double value; unsigned int word[NWORDS]; } memory_double; - memory_double m; - m.value = NaNd (); -# if DBL_EXPBIT0_BIT > 0 - m.word[DBL_EXPBIT0_WORD] ^= (unsigned int) 1 << (DBL_EXPBIT0_BIT - 1); -# else - m.word[DBL_EXPBIT0_WORD + (DBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] - ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); -# endif - m.word[DBL_EXPBIT0_WORD + (DBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] - |= (unsigned int) 1 << DBL_EXPBIT0_BIT; - ASSERT (isnand (m.value)); - } -#endif - return 0; -} diff --git a/tests/test-isnanf-nolibm.c b/tests/test-isnanf-nolibm.c new file mode 100644 --- /dev/null +++ b/tests/test-isnanf-nolibm.c @@ -0,0 +1,80 @@ +/* Test of isnanf() substitute. + Copyright (C) 2007-2008 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2007. */ + +#include + +#include "isnanf-nolibm.h" + +#include +#include +#include + +#include "nan.h" + +#define ASSERT(expr) \ + do \ + { \ + if (!(expr)) \ + { \ + fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ + fflush (stderr); \ + abort (); \ + } \ + } \ + while (0) + +int +main () +{ + /* Finite values. */ + ASSERT (!isnanf (3.141f)); + ASSERT (!isnanf (3.141e30f)); + ASSERT (!isnanf (3.141e-30f)); + ASSERT (!isnanf (-2.718f)); + ASSERT (!isnanf (-2.718e30f)); + ASSERT (!isnanf (-2.718e-30f)); + ASSERT (!isnanf (0.0f)); + ASSERT (!isnanf (-0.0f)); + /* Infinite values. */ + ASSERT (!isnanf (1.0f / 0.0f)); + ASSERT (!isnanf (-1.0f / 0.0f)); + /* Quiet NaN. */ + ASSERT (isnanf (NaNf ())); +#if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT + /* Signalling NaN. */ + { + #define NWORDS \ + ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) + typedef union { float value; unsigned int word[NWORDS]; } memory_float; + memory_float m; + m.value = NaNf (); +# if FLT_EXPBIT0_BIT > 0 + m.word[FLT_EXPBIT0_WORD] ^= (unsigned int) 1 << (FLT_EXPBIT0_BIT - 1); +# else + m.word[FLT_EXPBIT0_WORD + (FLT_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] + ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); +# endif + if (FLT_EXPBIT0_WORD < NWORDS / 2) + m.word[FLT_EXPBIT0_WORD + 1] |= (unsigned int) 1 << FLT_EXPBIT0_BIT; + else + m.word[0] |= (unsigned int) 1; + ASSERT (isnanf (m.value)); + } +#endif + return 0; +} diff --git a/tests/test-isnanf.c b/tests/test-isnanf.c deleted file mode 100644 --- a/tests/test-isnanf.c +++ /dev/null @@ -1,80 +0,0 @@ -/* Test of isnanf() substitute. - Copyright (C) 2007-2008 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Bruno Haible , 2007. */ - -#include - -#include "isnanf.h" - -#include -#include -#include - -#include "nan.h" - -#define ASSERT(expr) \ - do \ - { \ - if (!(expr)) \ - { \ - fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ - fflush (stderr); \ - abort (); \ - } \ - } \ - while (0) - -int -main () -{ - /* Finite values. */ - ASSERT (!isnanf (3.141f)); - ASSERT (!isnanf (3.141e30f)); - ASSERT (!isnanf (3.141e-30f)); - ASSERT (!isnanf (-2.718f)); - ASSERT (!isnanf (-2.718e30f)); - ASSERT (!isnanf (-2.718e-30f)); - ASSERT (!isnanf (0.0f)); - ASSERT (!isnanf (-0.0f)); - /* Infinite values. */ - ASSERT (!isnanf (1.0f / 0.0f)); - ASSERT (!isnanf (-1.0f / 0.0f)); - /* Quiet NaN. */ - ASSERT (isnanf (NaNf ())); -#if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT - /* Signalling NaN. */ - { - #define NWORDS \ - ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) - typedef union { float value; unsigned int word[NWORDS]; } memory_float; - memory_float m; - m.value = NaNf (); -# if FLT_EXPBIT0_BIT > 0 - m.word[FLT_EXPBIT0_WORD] ^= (unsigned int) 1 << (FLT_EXPBIT0_BIT - 1); -# else - m.word[FLT_EXPBIT0_WORD + (FLT_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)] - ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); -# endif - if (FLT_EXPBIT0_WORD < NWORDS / 2) - m.word[FLT_EXPBIT0_WORD + 1] |= (unsigned int) 1 << FLT_EXPBIT0_BIT; - else - m.word[0] |= (unsigned int) 1; - ASSERT (isnanf (m.value)); - } -#endif - return 0; -} diff --git a/tests/test-round1.c b/tests/test-round1.c --- a/tests/test-round1.c +++ b/tests/test-round1.c @@ -25,7 +25,7 @@ #include #include -#include "isnand.h" +#include "isnand-nolibm.h" #include "nan.h" #define ASSERT(expr) \ diff --git a/tests/test-round2.c b/tests/test-round2.c --- a/tests/test-round2.c +++ b/tests/test-round2.c @@ -37,7 +37,7 @@ #ifdef USE_LONG_DOUBLE # error Long double not supported. #elif ! defined USE_FLOAT -# include "isnand.h" +# include "isnand-nolibm.h" # define ISNAN isnand # define FUNCTION "round" # define DOUBLE_UINT uint64_t @@ -45,7 +45,7 @@ # define NUM_HIGHBITS 13 # define NUM_LOWBITS 4 #else /* defined USE_FLOAT */ -# include "isnanf.h" +# include "isnanf-nolibm.h" # define ISNAN isnanf # define FUNCTION "roundf" # define DOUBLE_UINT uint32_t diff --git a/tests/test-roundf1.c b/tests/test-roundf1.c --- a/tests/test-roundf1.c +++ b/tests/test-roundf1.c @@ -25,7 +25,7 @@ #include #include -#include "isnanf.h" +#include "isnanf-nolibm.h" #include "nan.h" #define ASSERT(expr) \ diff --git a/tests/test-strtod.c b/tests/test-strtod.c --- a/tests/test-strtod.c +++ b/tests/test-strtod.c @@ -25,7 +25,7 @@ #include #include -#include "isnand.h" +#include "isnand-nolibm.h" #define ASSERT(expr) \ do \ diff --git a/tests/test-trunc1.c b/tests/test-trunc1.c --- a/tests/test-trunc1.c +++ b/tests/test-trunc1.c @@ -23,7 +23,7 @@ #include #include -#include "isnand.h" +#include "isnand-nolibm.h" #include "nan.h" #define ASSERT(expr) \ diff --git a/tests/test-trunc2.c b/tests/test-trunc2.c --- a/tests/test-trunc2.c +++ b/tests/test-trunc2.c @@ -26,7 +26,7 @@ #include #include -#include "isnand.h" +#include "isnand-nolibm.h" #define ASSERT(expr) \ do \ diff --git a/tests/test-truncf1.c b/tests/test-truncf1.c --- a/tests/test-truncf1.c +++ b/tests/test-truncf1.c @@ -23,7 +23,7 @@ #include #include -#include "isnanf.h" +#include "isnanf-nolibm.h" #include "nan.h" #define ASSERT(expr) \ diff --git a/tests/test-truncf2.c b/tests/test-truncf2.c --- a/tests/test-truncf2.c +++ b/tests/test-truncf2.c @@ -26,7 +26,7 @@ #include #include -#include "isnanf.h" +#include "isnanf-nolibm.h" #define ASSERT(expr) \ do \