]> Savannah Git Hosting - gnulib.git/commitdiff
snan: New module.
authorBruno Haible <bruno@clisp.org>
Thu, 12 Oct 2023 19:46:13 +0000 (21:46 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 12 Oct 2023 19:46:13 +0000 (21:46 +0200)
* lib/snan.h: Renamed from tests/snan.h. Add double-inclusion guard.
* modules/snan: New file.
* isfinite-tests (Files): Remove tests/snan.h, m4/exponent*.m4.
(Depends-on): Add snan.
(configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION,
gl_DOUBLE_EXPONENT_LOCATION, gl_LONG_DOUBLE_EXPONENT_LOCATION.
* isinf-tests (Files): Remove tests/snan.h, m4/exponent*.m4.
(Depends-on): Add snan.
(configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION,
gl_DOUBLE_EXPONENT_LOCATION, gl_LONG_DOUBLE_EXPONENT_LOCATION.
* isnan-tests (Files): Remove tests/snan.h, m4/exponent*.m4.
(Depends-on): Add snan.
(configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION,
gl_DOUBLE_EXPONENT_LOCATION, gl_LONG_DOUBLE_EXPONENT_LOCATION.
* isnanf-nolibm-tests (Files): Remove tests/snan.h, m4/exponentf.m4.
(Depends-on): Add snan.
(configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION.
* isnanf-tests (Files): Remove tests/snan.h, m4/exponentf.m4.
(Depends-on): Add snan.
(configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION.
* isnand-nolibm-tests (Files): Remove tests/snan.h, m4/exponentd.m4.
(Depends-on): Add snan.
(configure.ac): Don't invoke gl_DOUBLE_EXPONENT_LOCATION.
* isnand-tests (Files): Remove tests/snan.h, m4/exponentd.m4.
(Depends-on): Add snan.
(configure.ac): Don't invoke gl_DOUBLE_EXPONENT_LOCATION.
* isnanl-nolibm-tests (Files): Remove tests/snan.h, m4/exponentl.m4.
(Depends-on): Add snan.
(configure.ac): Don't invoke gl_LONG_DOUBLE_EXPONENT_LOCATION.
* isnanl-tests (Files): Remove tests/snan.h, m4/exponentl.m4.
(Depends-on): Add snan.
(configure.ac): Don't invoke gl_LONG_DOUBLE_EXPONENT_LOCATION.
* signbit-tests (Files): Remove tests/snan.h, m4/exponent*.m4.
(Depends-on): Add snan.
(configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION,
gl_DOUBLE_EXPONENT_LOCATION, gl_LONG_DOUBLE_EXPONENT_LOCATION.
* stdio-tests (Files): Remove tests/snan.h
(Depends-on): Add snan.

15 files changed:
ChangeLog
lib/snan.h [new file with mode: 0644]
modules/isfinite-tests
modules/isinf-tests
modules/isnan-tests
modules/isnand-nolibm-tests
modules/isnand-tests
modules/isnanf-nolibm-tests
modules/isnanf-tests
modules/isnanl-nolibm-tests
modules/isnanl-tests
modules/signbit-tests
modules/snan [new file with mode: 0644]
modules/stdio-tests
tests/snan.h [deleted file]

index b072697e2a5be456a960caf27018640fdcb94b3a..ede627dca4a7fa9eadcd2fea108f7b1c333bbc2e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,45 @@
+2023-10-12  Bruno Haible  <bruno@clisp.org>
+
+       snan: New module.
+       * lib/snan.h: Renamed from tests/snan.h. Add double-inclusion guard.
+       * modules/snan: New file.
+       * isfinite-tests (Files): Remove tests/snan.h, m4/exponent*.m4.
+       (Depends-on): Add snan.
+       (configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION,
+       gl_DOUBLE_EXPONENT_LOCATION, gl_LONG_DOUBLE_EXPONENT_LOCATION.
+       * isinf-tests (Files): Remove tests/snan.h, m4/exponent*.m4.
+       (Depends-on): Add snan.
+       (configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION,
+       gl_DOUBLE_EXPONENT_LOCATION, gl_LONG_DOUBLE_EXPONENT_LOCATION.
+       * isnan-tests (Files): Remove tests/snan.h, m4/exponent*.m4.
+       (Depends-on): Add snan.
+       (configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION,
+       gl_DOUBLE_EXPONENT_LOCATION, gl_LONG_DOUBLE_EXPONENT_LOCATION.
+       * isnanf-nolibm-tests (Files): Remove tests/snan.h, m4/exponentf.m4.
+       (Depends-on): Add snan.
+       (configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION.
+       * isnanf-tests (Files): Remove tests/snan.h, m4/exponentf.m4.
+       (Depends-on): Add snan.
+       (configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION.
+       * isnand-nolibm-tests (Files): Remove tests/snan.h, m4/exponentd.m4.
+       (Depends-on): Add snan.
+       (configure.ac): Don't invoke gl_DOUBLE_EXPONENT_LOCATION.
+       * isnand-tests (Files): Remove tests/snan.h, m4/exponentd.m4.
+       (Depends-on): Add snan.
+       (configure.ac): Don't invoke gl_DOUBLE_EXPONENT_LOCATION.
+       * isnanl-nolibm-tests (Files): Remove tests/snan.h, m4/exponentl.m4.
+       (Depends-on): Add snan.
+       (configure.ac): Don't invoke gl_LONG_DOUBLE_EXPONENT_LOCATION.
+       * isnanl-tests (Files): Remove tests/snan.h, m4/exponentl.m4.
+       (Depends-on): Add snan.
+       (configure.ac): Don't invoke gl_LONG_DOUBLE_EXPONENT_LOCATION.
+       * signbit-tests (Files): Remove tests/snan.h, m4/exponent*.m4.
+       (Depends-on): Add snan.
+       (configure.ac): Don't invoke gl_FLOAT_EXPONENT_LOCATION,
+       gl_DOUBLE_EXPONENT_LOCATION, gl_LONG_DOUBLE_EXPONENT_LOCATION.
+       * stdio-tests (Files): Remove tests/snan.h
+       (Depends-on): Add snan.
+
 2023-10-12  Bruno Haible  <bruno@clisp.org>
 
        qnan: New module.
diff --git a/lib/snan.h b/lib/snan.h
new file mode 100644 (file)
index 0000000..5dd4dd6
--- /dev/null
@@ -0,0 +1,126 @@
+/* Macros for signalling not-a-number.
+   Copyright (C) 2007-2023 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 <https://www.gnu.org/licenses/>.  */
+
+#ifndef _SNAN_H
+#define _SNAN_H
+
+#include <float.h>
+#include <limits.h>
+#include <math.h>
+
+#include "nan.h"
+
+
+#if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
+
+# define HAVE_SNANF 1
+
+/* Returns a signalling 'float' NaN.  */
+_GL_UNUSED static float
+SNaNf ()
+{
+  #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;
+  #undef NWORDS
+  return m.value;
+}
+
+#endif
+
+
+#if defined DBL_EXPBIT0_WORD && defined DBL_EXPBIT0_BIT
+
+# define HAVE_SNAND 1
+
+/* Returns a signalling 'double' NaN.  */
+_GL_UNUSED static double
+SNaNd ()
+{
+  #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;
+  #undef NWORDS
+  return m.value;
+}
+
+#endif
+
+
+#if defined LDBL_EXPBIT0_WORD && defined LDBL_EXPBIT0_BIT
+
+# define HAVE_SNANL 1
+
+/* Returns a signalling 'long double' NaN.  */
+_GL_UNUSED static long double
+SNaNl ()
+{
+  /* A bit pattern that is different from a Quiet NaN.  With a bit of luck,
+     it's a Signalling NaN.  */
+  #define NWORDS \
+    ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+  typedef union { unsigned int word[NWORDS]; long double value; }
+          memory_long_double;
+  memory_long_double m;
+  m.value = NaNl ();
+  #if defined __powerpc__ && LDBL_MANT_DIG == 106
+    /* This is PowerPC "double double", a pair of two doubles.  Inf and NaN are
+       represented as the corresponding 64-bit IEEE values in the first double;
+       the second is ignored.  Manipulate only the first double.  */
+    #define HNWORDS \
+      ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+  #else
+    #define HNWORDS NWORDS
+  #endif
+  #if LDBL_EXPBIT0_BIT > 0
+    m.word[LDBL_EXPBIT0_WORD] ^= (unsigned int) 1 << (LDBL_EXPBIT0_BIT - 1);
+  #else
+    m.word[LDBL_EXPBIT0_WORD + (LDBL_EXPBIT0_WORD < HNWORDS / 2 ? 1 : - 1)]
+      ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
+  #endif
+  m.word[LDBL_EXPBIT0_WORD + (LDBL_EXPBIT0_WORD < HNWORDS / 2 ? 1 : - 1)]
+    |= (unsigned int) 1 << LDBL_EXPBIT0_BIT;
+  #undef HNWORDS
+  #undef NWORDS
+  return m.value;
+}
+
+#endif
+
+
+#endif /* _SNAN_H */
index 16f4c8d187f39ff13fd611dcce37e6272c45ec5f..5b316dd2eeafd7afbc8257171fff3e8551fdabc4 100644 (file)
@@ -1,20 +1,14 @@
 Files:
 tests/test-isfinite.c
 tests/infinity.h
-tests/snan.h
 tests/macros.h
-m4/exponentf.m4
-m4/exponentd.m4
-m4/exponentl.m4
 
 Depends-on:
 float
 nan
+snan
 
 configure.ac:
-gl_FLOAT_EXPONENT_LOCATION
-gl_DOUBLE_EXPONENT_LOCATION
-gl_LONG_DOUBLE_EXPONENT_LOCATION
 AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
 
 Makefile.am:
index caf77a88f920294dd215b7f9923395a4d18a3ae3..0cae337cb24a26e643e65b67f0d3b6dccaebcbff 100644 (file)
@@ -1,20 +1,14 @@
 Files:
 tests/test-isinf.c
 tests/infinity.h
-tests/snan.h
 tests/macros.h
-m4/exponentf.m4
-m4/exponentd.m4
-m4/exponentl.m4
 
 Depends-on:
 float
 nan
+snan
 
 configure.ac:
-gl_FLOAT_EXPONENT_LOCATION
-gl_DOUBLE_EXPONENT_LOCATION
-gl_LONG_DOUBLE_EXPONENT_LOCATION
 AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
 
 Makefile.am:
index 8da13c2349674c89f2e1bd548c731563ccb514fe..f0d5280cf31d0d3a26fcceefff7f40c9da8740a7 100644 (file)
@@ -2,20 +2,14 @@ Files:
 tests/test-isnan.c
 tests/minus-zero.h
 tests/infinity.h
-tests/snan.h
 tests/macros.h
-m4/exponentf.m4
-m4/exponentd.m4
-m4/exponentl.m4
 
 Depends-on:
 float
 nan
+snan
 
 configure.ac:
-gl_FLOAT_EXPONENT_LOCATION
-gl_DOUBLE_EXPONENT_LOCATION
-gl_LONG_DOUBLE_EXPONENT_LOCATION
 AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
 
 Makefile.am:
index b4fa23e9d92728b10a071bd3b2b8f8045f8f1f85..9a8569f96635ca2c7952ee3e973a1b86aa459aab 100644 (file)
@@ -3,15 +3,13 @@ tests/test-isnand-nolibm.c
 tests/test-isnand.h
 tests/minus-zero.h
 tests/infinity.h
-tests/snan.h
 tests/macros.h
-m4/exponentd.m4
 
 Depends-on:
 nan
+snan
 
 configure.ac:
-gl_DOUBLE_EXPONENT_LOCATION
 
 Makefile.am:
 TESTS += test-isnand-nolibm
index 82f4d2e1dcc404ce53ecd33c28f48d57b3a19858..a3c8b564c254a59c6edc52c0a1c9db689357f751 100644 (file)
@@ -3,15 +3,13 @@ tests/test-isnand.c
 tests/test-isnand.h
 tests/minus-zero.h
 tests/infinity.h
-tests/snan.h
 tests/macros.h
-m4/exponentd.m4
 
 Depends-on:
 nan
+snan
 
 configure.ac:
-gl_DOUBLE_EXPONENT_LOCATION
 
 Makefile.am:
 TESTS += test-isnand
index 6dece6e5d955420887093d25e1f000e6b87a4517..3ceb3c14d9d12fe28c4bbce7a55e6dcca941dbe0 100644 (file)
@@ -3,15 +3,13 @@ tests/test-isnanf-nolibm.c
 tests/test-isnanf.h
 tests/minus-zero.h
 tests/infinity.h
-tests/snan.h
 tests/macros.h
-m4/exponentf.m4
 
 Depends-on:
 nan
+snan
 
 configure.ac:
-gl_FLOAT_EXPONENT_LOCATION
 
 Makefile.am:
 TESTS += test-isnanf-nolibm
index 464618c2f98f8612ea95ab647ebef03b898a6b71..f1d5213ba8adfb72af100b67ab26d1fcb7b94212 100644 (file)
@@ -3,15 +3,13 @@ tests/test-isnanf.c
 tests/test-isnanf.h
 tests/minus-zero.h
 tests/infinity.h
-tests/snan.h
 tests/macros.h
-m4/exponentf.m4
 
 Depends-on:
 nan
+snan
 
 configure.ac:
-gl_FLOAT_EXPONENT_LOCATION
 
 Makefile.am:
 TESTS += test-isnanf
index 88a4ddfc9c4f3ea39b8eac41fe4ca9cf7ffd36ed..c35806d6a67df4099e2e958707ee61c38d04494b 100644 (file)
@@ -3,16 +3,14 @@ tests/test-isnanl-nolibm.c
 tests/test-isnanl.h
 tests/minus-zero.h
 tests/infinity.h
-tests/snan.h
 tests/macros.h
-m4/exponentl.m4
 
 Depends-on:
 float
 nan
+snan
 
 configure.ac:
-gl_LONG_DOUBLE_EXPONENT_LOCATION
 AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
 
 Makefile.am:
index 24ea78471e078f98d754b8b91e799458b0666f4b..22068081609c56b164ac2e6cbf747ee8fba1cc4d 100644 (file)
@@ -3,16 +3,14 @@ tests/test-isnanl.c
 tests/test-isnanl.h
 tests/minus-zero.h
 tests/infinity.h
-tests/snan.h
 tests/macros.h
-m4/exponentl.m4
 
 Depends-on:
 float
 nan
+snan
 
 configure.ac:
-gl_LONG_DOUBLE_EXPONENT_LOCATION
 AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
 
 Makefile.am:
index c194881503bd8e599c209292d0c8a394a9ac2100..c491d7c8851c3377f957eee30517ae55bdce8e49 100644 (file)
@@ -2,20 +2,14 @@ Files:
 tests/test-signbit.c
 tests/minus-zero.h
 tests/infinity.h
-tests/snan.h
 tests/macros.h
-m4/exponentf.m4
-m4/exponentd.m4
-m4/exponentl.m4
 
 Depends-on:
 float
 qnan
+snan
 
 configure.ac:
-AC_REQUIRE([gl_FLOAT_EXPONENT_LOCATION])
-AC_REQUIRE([gl_DOUBLE_EXPONENT_LOCATION])
-AC_REQUIRE([gl_LONG_DOUBLE_EXPONENT_LOCATION])
 
 Makefile.am:
 TESTS += test-signbit
diff --git a/modules/snan b/modules/snan
new file mode 100644 (file)
index 0000000..2ccbb11
--- /dev/null
@@ -0,0 +1,29 @@
+Description:
+Macros for signalling not-a-number.
+
+Files:
+lib/snan.h
+m4/snan.m4
+m4/exponentf.m4
+m4/exponentd.m4
+m4/exponentl.m4
+
+Depends-on:
+nan
+
+configure.ac:
+gl_SNAN
+
+Makefile.am:
+lib_SOURCES += snan.h
+
+Include:
+"snan.h"
+
+Link:
+
+License:
+GPL
+
+Maintainer:
+all
index d1bec9d4412e2cbf276f6e821f7494dbde51df87..5f94d3961d81da8124b19b876785b1e0f71ed714 100644 (file)
@@ -1,12 +1,12 @@
 Files:
 tests/test-stdio.c
-tests/snan.h
 tests/macros.h
 m4/exponentd.m4
 
 Depends-on:
 assert-h
 qnan
+snan
 stdio-c++-tests
 fgetc-tests
 fputc-tests
diff --git a/tests/snan.h b/tests/snan.h
deleted file mode 100644 (file)
index e877000..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-/* Macros for signalling not-a-number.
-   Copyright (C) 2007-2023 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 <https://www.gnu.org/licenses/>.  */
-
-#include <float.h>
-#include <limits.h>
-#include <math.h>
-
-#include "nan.h"
-
-
-#if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
-
-# define HAVE_SNANF 1
-
-/* Returns a signalling 'float' NaN.  */
-_GL_UNUSED static float
-SNaNf ()
-{
-  #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;
-  #undef NWORDS
-  return m.value;
-}
-
-#endif
-
-
-#if defined DBL_EXPBIT0_WORD && defined DBL_EXPBIT0_BIT
-
-# define HAVE_SNAND 1
-
-/* Returns a signalling 'double' NaN.  */
-_GL_UNUSED static double
-SNaNd ()
-{
-  #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;
-  #undef NWORDS
-  return m.value;
-}
-
-#endif
-
-
-#if defined LDBL_EXPBIT0_WORD && defined LDBL_EXPBIT0_BIT
-
-# define HAVE_SNANL 1
-
-/* Returns a signalling 'long double' NaN.  */
-_GL_UNUSED static long double
-SNaNl ()
-{
-  /* A bit pattern that is different from a Quiet NaN.  With a bit of luck,
-     it's a Signalling NaN.  */
-  #define NWORDS \
-    ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
-  typedef union { unsigned int word[NWORDS]; long double value; }
-          memory_long_double;
-  memory_long_double m;
-  m.value = NaNl ();
-  #if defined __powerpc__ && LDBL_MANT_DIG == 106
-    /* This is PowerPC "double double", a pair of two doubles.  Inf and NaN are
-       represented as the corresponding 64-bit IEEE values in the first double;
-       the second is ignored.  Manipulate only the first double.  */
-    #define HNWORDS \
-      ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
-  #else
-    #define HNWORDS NWORDS
-  #endif
-  #if LDBL_EXPBIT0_BIT > 0
-    m.word[LDBL_EXPBIT0_WORD] ^= (unsigned int) 1 << (LDBL_EXPBIT0_BIT - 1);
-  #else
-    m.word[LDBL_EXPBIT0_WORD + (LDBL_EXPBIT0_WORD < HNWORDS / 2 ? 1 : - 1)]
-      ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
-  #endif
-  m.word[LDBL_EXPBIT0_WORD + (LDBL_EXPBIT0_WORD < HNWORDS / 2 ? 1 : - 1)]
-    |= (unsigned int) 1 << LDBL_EXPBIT0_BIT;
-  #undef HNWORDS
-  #undef NWORDS
-  return m.value;
-}
-
-#endif