* lib/qnan.h: Renamed from tests/qnan.h. Add double-inclusion guard.
* modules/qnan: New file.
* modules/signbit-tests (Files): Remove tests/qnan.h.
(Depends-on): Add qnan. Remove nan.
* modules/stdio-tests (Files): Remove tests/qnan.h.
(Depends-on): Add qnan. Remove nan.
* modules/totalorder-tests (Files): Remove tests/qnan.h.
(Depends-on): Add qnan. Remove nan, signbit.
* modules/totalorderf-tests (Files): Remove tests/qnan.h.
(Depends-on): Add qnan. Remove nan, signbit.
* modules/totalorderl-tests (Files): Remove tests/qnan.h.
(Depends-on): Add qnan. Remove nan, signbit.
+2023-10-12 Bruno Haible <bruno@clisp.org>
+
+ qnan: New module.
+ * lib/qnan.h: Renamed from tests/qnan.h. Add double-inclusion guard.
+ * modules/qnan: New file.
+ * modules/signbit-tests (Files): Remove tests/qnan.h.
+ (Depends-on): Add qnan. Remove nan.
+ * modules/stdio-tests (Files): Remove tests/qnan.h.
+ (Depends-on): Add qnan. Remove nan.
+ * modules/totalorder-tests (Files): Remove tests/qnan.h.
+ (Depends-on): Add qnan. Remove nan, signbit.
+ * modules/totalorderf-tests (Files): Remove tests/qnan.h.
+ (Depends-on): Add qnan. Remove nan, signbit.
+ * modules/totalorderl-tests (Files): Remove tests/qnan.h.
+ (Depends-on): Add qnan. Remove nan, signbit.
+
2023-10-12 Bruno Haible <bruno@clisp.org>
nan: New module.
--- /dev/null
+/* Macros for quiet not-a-number.
+ Copyright (C) 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 _QNAN_H
+#define _QNAN_H
+
+#include <math.h>
+
+#include "nan.h"
+
+
+/* Returns a quiet 'float' NaN with sign bit == 0. */
+_GL_UNUSED static float
+positive_NaNf ()
+{
+ /* 'volatile' works around a GCC bug:
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111655> */
+ float volatile nan = NaNf ();
+ return (signbit (nan) ? - nan : nan);
+}
+
+/* Returns a quiet 'float' NaN with sign bit == 1. */
+_GL_UNUSED static float
+negative_NaNf ()
+{
+ /* 'volatile' works around a GCC bug:
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111655> */
+ float volatile nan = NaNf ();
+ return (signbit (nan) ? nan : - nan);
+}
+
+
+/* Returns a quiet 'double' NaN with sign bit == 0. */
+_GL_UNUSED static double
+positive_NaNd ()
+{
+ /* 'volatile' works around a GCC bug:
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111655> */
+ double volatile nan = NaNd ();
+ return (signbit (nan) ? - nan : nan);
+}
+
+/* Returns a quiet 'double' NaN with sign bit == 1. */
+_GL_UNUSED static double
+negative_NaNd ()
+{
+ /* 'volatile' works around a GCC bug:
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111655> */
+ double volatile nan = NaNd ();
+ return (signbit (nan) ? nan : - nan);
+}
+
+
+/* Returns a quiet 'long double' NaN with sign bit == 0. */
+_GL_UNUSED static long double
+positive_NaNl ()
+{
+ /* 'volatile' works around a GCC bug:
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111655> */
+ long double volatile nan = NaNl ();
+ return (signbit (nan) ? - nan : nan);
+}
+
+/* Returns a quiet 'long double' NaN with sign bit == 1. */
+_GL_UNUSED static long double
+negative_NaNl ()
+{
+ /* 'volatile' works around a GCC bug:
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111655> */
+ long double volatile nan = NaNl ();
+ return (signbit (nan) ? nan : - nan);
+}
+
+
+#endif /* _QNAN_H */
--- /dev/null
+Description:
+Macros for quiet not-a-number.
+
+Files:
+lib/qnan.h
+
+Depends-on:
+nan
+signbit
+
+configure.ac:
+
+Makefile.am:
+lib_SOURCES += qnan.h
+
+Include:
+"qnan.h"
+
+Link:
+
+License:
+GPL
+
+Maintainer:
+all
tests/test-signbit.c
tests/minus-zero.h
tests/infinity.h
-tests/qnan.h
tests/snan.h
tests/macros.h
m4/exponentf.m4
Depends-on:
float
-nan
+qnan
configure.ac:
AC_REQUIRE([gl_FLOAT_EXPONENT_LOCATION])
Files:
tests/test-stdio.c
-tests/qnan.h
tests/snan.h
tests/macros.h
m4/exponentd.m4
Depends-on:
assert-h
-nan
+qnan
stdio-c++-tests
fgetc-tests
fputc-tests
tests/test-totalorder.c
tests/minus-zero.h
tests/infinity.h
-tests/qnan.h
tests/macros.h
Depends-on:
-nan
-signbit
+qnan
configure.ac:
tests/test-totalorder.c
tests/minus-zero.h
tests/infinity.h
-tests/qnan.h
tests/macros.h
Depends-on:
-nan
-signbit
+qnan
configure.ac:
tests/test-totalorder.c
tests/minus-zero.h
tests/infinity.h
-tests/qnan.h
tests/macros.h
Depends-on:
-nan
-signbit
+qnan
configure.ac:
+++ /dev/null
-/* Macros for quiet not-a-number.
- Copyright (C) 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 <math.h>
-
-#include "nan.h"
-
-
-/* Returns a quiet 'float' NaN with sign bit == 0. */
-_GL_UNUSED static float
-positive_NaNf ()
-{
- /* 'volatile' works around a GCC bug:
- <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111655> */
- float volatile nan = NaNf ();
- return (signbit (nan) ? - nan : nan);
-}
-
-/* Returns a quiet 'float' NaN with sign bit == 1. */
-_GL_UNUSED static float
-negative_NaNf ()
-{
- /* 'volatile' works around a GCC bug:
- <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111655> */
- float volatile nan = NaNf ();
- return (signbit (nan) ? nan : - nan);
-}
-
-
-/* Returns a quiet 'double' NaN with sign bit == 0. */
-_GL_UNUSED static double
-positive_NaNd ()
-{
- /* 'volatile' works around a GCC bug:
- <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111655> */
- double volatile nan = NaNd ();
- return (signbit (nan) ? - nan : nan);
-}
-
-/* Returns a quiet 'double' NaN with sign bit == 1. */
-_GL_UNUSED static double
-negative_NaNd ()
-{
- /* 'volatile' works around a GCC bug:
- <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111655> */
- double volatile nan = NaNd ();
- return (signbit (nan) ? nan : - nan);
-}
-
-
-/* Returns a quiet 'long double' NaN with sign bit == 0. */
-_GL_UNUSED static long double
-positive_NaNl ()
-{
- /* 'volatile' works around a GCC bug:
- <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111655> */
- long double volatile nan = NaNl ();
- return (signbit (nan) ? - nan : nan);
-}
-
-/* Returns a quiet 'long double' NaN with sign bit == 1. */
-_GL_UNUSED static long double
-negative_NaNl ()
-{
- /* 'volatile' works around a GCC bug:
- <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111655> */
- long double volatile nan = NaNl ();
- return (signbit (nan) ? nan : - nan);
-}