From: Bruno Haible Date: Thu, 12 Oct 2023 18:59:58 +0000 (+0200) Subject: nan: New module. X-Git-Tag: v1.0~723 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=8c3d2d19749ab44742ba03509b48af47832ba85b;p=gnulib.git nan: New module. * lib/nan.h: Renamed from tests/nan.h. Change double-inclusion guard. * modules/nan: New file. * modules/*-tests: Depend on this module instead of embedding tests/nan.h. --- diff --git a/ChangeLog b/ChangeLog index 22205096a3..9014954a2f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2023-10-12 Bruno Haible + + nan: New module. + * lib/nan.h: Renamed from tests/nan.h. Change double-inclusion guard. + * modules/nan: New file. + * modules/*-tests: Depend on this module instead of embedding + tests/nan.h. + 2023-10-11 Bruno Haible unictype/category-and-not: Add more tests. diff --git a/lib/nan.h b/lib/nan.h new file mode 100644 index 0000000000..4cb56350f8 --- /dev/null +++ b/lib/nan.h @@ -0,0 +1,91 @@ +/* Macros for quiet 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 . */ + +#ifndef _GL_NAN_H +#define _GL_NAN_H + + +/* IBM z/OS supports both hexadecimal and IEEE floating-point formats. The + former does not support NaN and its isnan() implementation returns zero + for all values. */ +#if defined __MVS__ && defined __IBMC__ && !defined __BFP__ +# error "NaN is not supported with IBM's hexadecimal floating-point format; please re-compile with -qfloat=ieee" +#endif + +/* NaNf () returns a 'float' not-a-number. */ + +/* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler choke + on the expression 0.0 / 0.0. The IBM XL C compiler on z/OS complains. + PGI 16.10 complains. */ +#if (defined __DECC || defined _MSC_VER \ + || (defined __MVS__ && defined __IBMC__) \ + || defined __PGI) +static float +NaNf () +{ + static float zero = 0.0f; + return zero / zero; +} +#else +# define NaNf() (0.0f / 0.0f) +#endif + + +/* NaNd () returns a 'double' not-a-number. */ + +/* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler choke + on the expression 0.0 / 0.0. The IBM XL C compiler on z/OS complains. + PGI 16.10 complains. */ +#if (defined __DECC || defined _MSC_VER \ + || (defined __MVS__ && defined __IBMC__) \ + || defined __PGI) +static double +NaNd () +{ + static double zero = 0.0; + return zero / zero; +} +#else +# define NaNd() (0.0 / 0.0) +#endif + + +/* NaNl () returns a 'long double' not-a-number. */ + +/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the + runtime type conversion. + The Microsoft MSVC 9 compiler chokes on the expression 0.0L / 0.0L. + The IBM XL C compiler on z/OS complains. + PGI 16.10 complains. */ +#ifdef __sgi +static long double NaNl () +{ + double zero = 0.0; + return zero / zero; +} +#elif defined _MSC_VER || (defined __MVS__ && defined __IBMC__) || defined __PGI +static long double +NaNl () +{ + static long double zero = 0.0L; + return zero / zero; +} +#else +# define NaNl() (0.0L / 0.0L) +#endif + + +#endif /* _GL_NAN_H */ diff --git a/modules/cbrt-ieee-tests b/modules/cbrt-ieee-tests index a61339974e..5d716b70fb 100644 --- a/modules/cbrt-ieee-tests +++ b/modules/cbrt-ieee-tests @@ -3,12 +3,12 @@ tests/test-cbrt-ieee.c tests/test-cbrt-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnand-nolibm float +nan signbit configure.ac: diff --git a/modules/cbrtf-ieee-tests b/modules/cbrtf-ieee-tests index abf8e0a4b0..d7eb527802 100644 --- a/modules/cbrtf-ieee-tests +++ b/modules/cbrtf-ieee-tests @@ -3,12 +3,12 @@ tests/test-cbrtf-ieee.c tests/test-cbrt-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanf-nolibm float +nan signbit configure.ac: diff --git a/modules/cbrtl-ieee-tests b/modules/cbrtl-ieee-tests index 82a55cc5a3..89f28a2543 100644 --- a/modules/cbrtl-ieee-tests +++ b/modules/cbrtl-ieee-tests @@ -3,12 +3,12 @@ tests/test-cbrtl-ieee.c tests/test-cbrt-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanl-nolibm float +nan signbit configure.ac: diff --git a/modules/ceil-ieee-tests b/modules/ceil-ieee-tests index 48b852830d..d34057a7c6 100644 --- a/modules/ceil-ieee-tests +++ b/modules/ceil-ieee-tests @@ -2,12 +2,12 @@ Files: tests/test-ceil-ieee.c tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnand-nolibm float +nan signbit configure.ac: diff --git a/modules/ceil-tests b/modules/ceil-tests index 4051d1c256..bc52dffc5f 100644 --- a/modules/ceil-tests +++ b/modules/ceil-tests @@ -3,13 +3,13 @@ tests/test-ceil1.c tests/test-ceil2.c tests/minus-zero.h tests/infinity.h -tests/nan.h tests/signature.h tests/macros.h Depends-on: float isnand-nolibm +nan stdbool stdint diff --git a/modules/ceilf-ieee-tests b/modules/ceilf-ieee-tests index 33e7be7906..b1ef54e411 100644 --- a/modules/ceilf-ieee-tests +++ b/modules/ceilf-ieee-tests @@ -2,12 +2,12 @@ Files: tests/test-ceilf-ieee.c tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanf-nolibm float +nan signbit configure.ac: diff --git a/modules/ceilf-tests b/modules/ceilf-tests index 6ead40244e..70ca713a16 100644 --- a/modules/ceilf-tests +++ b/modules/ceilf-tests @@ -3,13 +3,13 @@ tests/test-ceilf1.c tests/test-ceilf2.c tests/minus-zero.h tests/infinity.h -tests/nan.h tests/signature.h tests/macros.h Depends-on: float isnanf-nolibm +nan stdbool stdint diff --git a/modules/ceill-ieee-tests b/modules/ceill-ieee-tests index 1ac70b36a4..d02cdf0457 100644 --- a/modules/ceill-ieee-tests +++ b/modules/ceill-ieee-tests @@ -2,13 +2,13 @@ Files: tests/test-ceill-ieee.c tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: fpucw isnanl-nolibm float +nan signbit configure.ac: diff --git a/modules/ceill-tests b/modules/ceill-tests index d6176c8351..d6d0b1a6cb 100644 --- a/modules/ceill-tests +++ b/modules/ceill-tests @@ -2,7 +2,6 @@ Files: tests/test-ceill.c tests/minus-zero.h tests/infinity.h -tests/nan.h tests/signature.h tests/macros.h @@ -10,6 +9,7 @@ Depends-on: fpucw isnanl-nolibm float +nan configure.ac: diff --git a/modules/exp-ieee-tests b/modules/exp-ieee-tests index e36415476c..91cd4d140b 100644 --- a/modules/exp-ieee-tests +++ b/modules/exp-ieee-tests @@ -3,12 +3,12 @@ tests/test-exp-ieee.c tests/test-exp-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnand-nolibm float +nan signbit configure.ac: diff --git a/modules/exp2-ieee-tests b/modules/exp2-ieee-tests index a2d6c57308..406040df8c 100644 --- a/modules/exp2-ieee-tests +++ b/modules/exp2-ieee-tests @@ -3,12 +3,12 @@ tests/test-exp2-ieee.c tests/test-exp2-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnand-nolibm float +nan signbit configure.ac: diff --git a/modules/exp2f-ieee-tests b/modules/exp2f-ieee-tests index cbbb0dda86..e131e5bfbe 100644 --- a/modules/exp2f-ieee-tests +++ b/modules/exp2f-ieee-tests @@ -3,12 +3,12 @@ tests/test-exp2f-ieee.c tests/test-exp2-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanf-nolibm float +nan signbit configure.ac: diff --git a/modules/exp2l-ieee-tests b/modules/exp2l-ieee-tests index e76503a69e..f36238b27b 100644 --- a/modules/exp2l-ieee-tests +++ b/modules/exp2l-ieee-tests @@ -3,12 +3,12 @@ tests/test-exp2l-ieee.c tests/test-exp2-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanl-nolibm float +nan signbit configure.ac: diff --git a/modules/expf-ieee-tests b/modules/expf-ieee-tests index 582824cc7e..0f07c3be5a 100644 --- a/modules/expf-ieee-tests +++ b/modules/expf-ieee-tests @@ -3,12 +3,12 @@ tests/test-expf-ieee.c tests/test-exp-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanf-nolibm float +nan signbit configure.ac: diff --git a/modules/expl-ieee-tests b/modules/expl-ieee-tests index 53b4ae87f9..478fe068f6 100644 --- a/modules/expl-ieee-tests +++ b/modules/expl-ieee-tests @@ -3,12 +3,12 @@ tests/test-expl-ieee.c tests/test-exp-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanl-nolibm float +nan signbit configure.ac: diff --git a/modules/expm1-ieee-tests b/modules/expm1-ieee-tests index 4569a7b76c..984c8190fe 100644 --- a/modules/expm1-ieee-tests +++ b/modules/expm1-ieee-tests @@ -3,12 +3,12 @@ tests/test-expm1-ieee.c tests/test-expm1-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnand-nolibm float +nan signbit configure.ac: diff --git a/modules/expm1f-ieee-tests b/modules/expm1f-ieee-tests index 4c64b333a3..c961d0f8ae 100644 --- a/modules/expm1f-ieee-tests +++ b/modules/expm1f-ieee-tests @@ -3,12 +3,12 @@ tests/test-expm1f-ieee.c tests/test-expm1-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanf-nolibm float +nan signbit configure.ac: diff --git a/modules/expm1l-ieee-tests b/modules/expm1l-ieee-tests index f0f3029d01..334a15cb53 100644 --- a/modules/expm1l-ieee-tests +++ b/modules/expm1l-ieee-tests @@ -3,12 +3,12 @@ tests/test-expm1l-ieee.c tests/test-expm1-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanl-nolibm float +nan signbit configure.ac: diff --git a/modules/fabs-ieee-tests b/modules/fabs-ieee-tests index 4c638c1013..5068d2c236 100644 --- a/modules/fabs-ieee-tests +++ b/modules/fabs-ieee-tests @@ -3,12 +3,12 @@ tests/test-fabs-ieee.c tests/test-fabs-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnand-nolibm float +nan signbit configure.ac: diff --git a/modules/fabsf-ieee-tests b/modules/fabsf-ieee-tests index 93baaf81e1..40c534d586 100644 --- a/modules/fabsf-ieee-tests +++ b/modules/fabsf-ieee-tests @@ -3,12 +3,12 @@ tests/test-fabsf-ieee.c tests/test-fabs-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanf-nolibm float +nan signbit configure.ac: diff --git a/modules/fabsl-ieee-tests b/modules/fabsl-ieee-tests index 339c478612..c408f9f2d7 100644 --- a/modules/fabsl-ieee-tests +++ b/modules/fabsl-ieee-tests @@ -3,12 +3,12 @@ tests/test-fabsl-ieee.c tests/test-fabs-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanl-nolibm float +nan signbit configure.ac: diff --git a/modules/floor-ieee-tests b/modules/floor-ieee-tests index 2bedce03e3..e67cc38cc6 100644 --- a/modules/floor-ieee-tests +++ b/modules/floor-ieee-tests @@ -2,12 +2,12 @@ Files: tests/test-floor-ieee.c tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnand-nolibm float +nan signbit configure.ac: diff --git a/modules/floor-tests b/modules/floor-tests index c57c3c9ecc..3cdb214640 100644 --- a/modules/floor-tests +++ b/modules/floor-tests @@ -3,13 +3,13 @@ tests/test-floor1.c tests/test-floor2.c tests/minus-zero.h tests/infinity.h -tests/nan.h tests/signature.h tests/macros.h Depends-on: float isnand-nolibm +nan stdbool stdint diff --git a/modules/floorf-ieee-tests b/modules/floorf-ieee-tests index 3f84817d87..67cd2cab40 100644 --- a/modules/floorf-ieee-tests +++ b/modules/floorf-ieee-tests @@ -2,12 +2,12 @@ Files: tests/test-floorf-ieee.c tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanf-nolibm float +nan signbit configure.ac: diff --git a/modules/floorf-tests b/modules/floorf-tests index 8e70043688..b819eccd0e 100644 --- a/modules/floorf-tests +++ b/modules/floorf-tests @@ -3,13 +3,13 @@ tests/test-floorf1.c tests/test-floorf2.c tests/minus-zero.h tests/infinity.h -tests/nan.h tests/signature.h tests/macros.h Depends-on: float isnanf-nolibm +nan stdbool stdint diff --git a/modules/floorl-ieee-tests b/modules/floorl-ieee-tests index 6b976abc43..9e011ea4ab 100644 --- a/modules/floorl-ieee-tests +++ b/modules/floorl-ieee-tests @@ -2,13 +2,13 @@ Files: tests/test-floorl-ieee.c tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: fpucw isnanl-nolibm float +nan signbit configure.ac: diff --git a/modules/floorl-tests b/modules/floorl-tests index 68ef0f56a5..6342f4c7a6 100644 --- a/modules/floorl-tests +++ b/modules/floorl-tests @@ -2,7 +2,6 @@ Files: tests/test-floorl.c tests/minus-zero.h tests/infinity.h -tests/nan.h tests/signature.h tests/macros.h @@ -10,6 +9,7 @@ Depends-on: fpucw isnanl-nolibm float +nan configure.ac: diff --git a/modules/fma-ieee-tests b/modules/fma-ieee-tests index 13ac84e1ce..94343268b1 100644 --- a/modules/fma-ieee-tests +++ b/modules/fma-ieee-tests @@ -2,11 +2,11 @@ Files: tests/test-fma-ieee.c tests/test-fma-ieee.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnand-nolibm +nan configure.ac: diff --git a/modules/fma-tests b/modules/fma-tests index b1fbc7e346..0a39f08ef5 100644 --- a/modules/fma-tests +++ b/modules/fma-tests @@ -4,7 +4,6 @@ tests/test-fma1.h tests/test-fma2.c tests/test-fma2.h tests/infinity.h -tests/nan.h tests/signature.h tests/macros.h lib/float+.h @@ -13,6 +12,7 @@ Depends-on: float isnand-nolibm ldexp +nan configure.ac: diff --git a/modules/fmaf-ieee-tests b/modules/fmaf-ieee-tests index c08140623d..4f10c79099 100644 --- a/modules/fmaf-ieee-tests +++ b/modules/fmaf-ieee-tests @@ -2,11 +2,11 @@ Files: tests/test-fmaf-ieee.c tests/test-fma-ieee.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanf-nolibm +nan configure.ac: diff --git a/modules/fmaf-tests b/modules/fmaf-tests index aa7fd8dadf..6d5af9ae4e 100644 --- a/modules/fmaf-tests +++ b/modules/fmaf-tests @@ -4,7 +4,6 @@ tests/test-fma1.h tests/test-fmaf2.c tests/test-fma2.h tests/infinity.h -tests/nan.h tests/signature.h tests/macros.h lib/float+.h @@ -13,6 +12,7 @@ Depends-on: float isnanf-nolibm ldexpf +nan configure.ac: diff --git a/modules/fmal-ieee-tests b/modules/fmal-ieee-tests index 38897ca949..2ae806a344 100644 --- a/modules/fmal-ieee-tests +++ b/modules/fmal-ieee-tests @@ -2,11 +2,11 @@ Files: tests/test-fmal-ieee.c tests/test-fma-ieee.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanl-nolibm +nan configure.ac: diff --git a/modules/fmal-tests b/modules/fmal-tests index 5f04dc4375..af97c39dc3 100644 --- a/modules/fmal-tests +++ b/modules/fmal-tests @@ -4,7 +4,6 @@ tests/test-fma1.h tests/test-fmal2.c tests/test-fma2.h tests/infinity.h -tests/nan.h tests/signature.h tests/macros.h lib/float+.h @@ -14,6 +13,7 @@ float fpucw isnanl-nolibm ldexpl +nan configure.ac: diff --git a/modules/fmod-ieee-tests b/modules/fmod-ieee-tests index 1f5634d3d3..7d57627370 100644 --- a/modules/fmod-ieee-tests +++ b/modules/fmod-ieee-tests @@ -3,12 +3,12 @@ tests/test-fmod-ieee.c tests/test-fmod-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnand-nolibm float +nan signbit configure.ac: diff --git a/modules/fmodf-ieee-tests b/modules/fmodf-ieee-tests index 61bbce90d9..5bac69b84e 100644 --- a/modules/fmodf-ieee-tests +++ b/modules/fmodf-ieee-tests @@ -3,12 +3,12 @@ tests/test-fmodf-ieee.c tests/test-fmod-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanf-nolibm float +nan signbit configure.ac: diff --git a/modules/fmodl-ieee-tests b/modules/fmodl-ieee-tests index 2ac20eb13f..7534033ce6 100644 --- a/modules/fmodl-ieee-tests +++ b/modules/fmodl-ieee-tests @@ -3,12 +3,12 @@ tests/test-fmodl-ieee.c tests/test-fmod-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanl-nolibm float +nan signbit configure.ac: diff --git a/modules/frexp-ieee-tests b/modules/frexp-ieee-tests index c055d525ab..391ad51d5c 100644 --- a/modules/frexp-ieee-tests +++ b/modules/frexp-ieee-tests @@ -3,12 +3,12 @@ tests/test-frexp-ieee.c tests/test-frexp-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnand-nolibm float +nan signbit configure.ac: diff --git a/modules/frexp-nolibm-tests b/modules/frexp-nolibm-tests index 39e81590ee..333ff3e869 100644 --- a/modules/frexp-nolibm-tests +++ b/modules/frexp-nolibm-tests @@ -3,13 +3,13 @@ tests/test-frexp.c tests/test-frexp.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/signature.h tests/macros.h tests/randomd.c Depends-on: isnand-nolibm +nan signbit configure.ac: diff --git a/modules/frexp-tests b/modules/frexp-tests index 0d957f28c0..7e327cbc77 100644 --- a/modules/frexp-tests +++ b/modules/frexp-tests @@ -3,13 +3,13 @@ tests/test-frexp.c tests/test-frexp.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/signature.h tests/macros.h tests/randomd.c Depends-on: isnand-nolibm +nan signbit configure.ac: diff --git a/modules/frexpf-ieee-tests b/modules/frexpf-ieee-tests index 19fb494a75..89cc669cbd 100644 --- a/modules/frexpf-ieee-tests +++ b/modules/frexpf-ieee-tests @@ -3,12 +3,12 @@ tests/test-frexpf-ieee.c tests/test-frexp-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanf-nolibm float +nan signbit configure.ac: diff --git a/modules/frexpf-tests b/modules/frexpf-tests index c7bfbed6c1..7d92de13b7 100644 --- a/modules/frexpf-tests +++ b/modules/frexpf-tests @@ -3,13 +3,13 @@ tests/test-frexpf.c tests/test-frexp.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/signature.h tests/macros.h tests/randomf.c Depends-on: isnanf-nolibm +nan signbit configure.ac: diff --git a/modules/frexpl-ieee-tests b/modules/frexpl-ieee-tests index bd19689617..77e56b84ef 100644 --- a/modules/frexpl-ieee-tests +++ b/modules/frexpl-ieee-tests @@ -3,12 +3,12 @@ tests/test-frexpl-ieee.c tests/test-frexp-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanl-nolibm float +nan signbit configure.ac: diff --git a/modules/frexpl-nolibm-tests b/modules/frexpl-nolibm-tests index 7f5d547779..a3ae1bed45 100644 --- a/modules/frexpl-nolibm-tests +++ b/modules/frexpl-nolibm-tests @@ -3,7 +3,6 @@ tests/test-frexpl.c tests/test-frexp.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/signature.h tests/macros.h tests/randoml.c @@ -12,6 +11,7 @@ Depends-on: fpucw isnanl-nolibm signbit +nan configure.ac: diff --git a/modules/frexpl-tests b/modules/frexpl-tests index 2c0f99ed1b..6fd1abd096 100644 --- a/modules/frexpl-tests +++ b/modules/frexpl-tests @@ -3,7 +3,6 @@ tests/test-frexpl.c tests/test-frexp.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/signature.h tests/macros.h tests/randoml.c @@ -13,6 +12,7 @@ fpucw isnanl-nolibm signbit float +nan configure.ac: diff --git a/modules/hypot-ieee-tests b/modules/hypot-ieee-tests index 1fb7f3e40e..9568c03d1e 100644 --- a/modules/hypot-ieee-tests +++ b/modules/hypot-ieee-tests @@ -3,12 +3,12 @@ tests/test-hypot-ieee.c tests/test-hypot-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnand-nolibm float +nan signbit configure.ac: diff --git a/modules/hypotf-ieee-tests b/modules/hypotf-ieee-tests index 2296636574..43fea67e30 100644 --- a/modules/hypotf-ieee-tests +++ b/modules/hypotf-ieee-tests @@ -3,12 +3,12 @@ tests/test-hypotf-ieee.c tests/test-hypot-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanf-nolibm float +nan signbit configure.ac: diff --git a/modules/hypotl-ieee-tests b/modules/hypotl-ieee-tests index dc7bf7756b..7bc00a2b3c 100644 --- a/modules/hypotl-ieee-tests +++ b/modules/hypotl-ieee-tests @@ -3,12 +3,12 @@ tests/test-hypotl-ieee.c tests/test-hypot-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanl-nolibm float +nan signbit configure.ac: diff --git a/modules/ilogb-tests b/modules/ilogb-tests index cb3eab542b..6ad236f71f 100644 --- a/modules/ilogb-tests +++ b/modules/ilogb-tests @@ -3,12 +3,12 @@ tests/test-ilogb.c tests/test-ilogb.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/signature.h tests/macros.h tests/randomd.c Depends-on: +nan configure.ac: diff --git a/modules/ilogbf-tests b/modules/ilogbf-tests index fca042a76d..05accc540f 100644 --- a/modules/ilogbf-tests +++ b/modules/ilogbf-tests @@ -3,12 +3,12 @@ tests/test-ilogbf.c tests/test-ilogb.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/signature.h tests/macros.h tests/randomf.c Depends-on: +nan configure.ac: diff --git a/modules/ilogbl-tests b/modules/ilogbl-tests index af350d2878..a098b0a8d1 100644 --- a/modules/ilogbl-tests +++ b/modules/ilogbl-tests @@ -3,12 +3,12 @@ tests/test-ilogbl.c tests/test-ilogb.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/signature.h tests/macros.h tests/randoml.c Depends-on: +nan configure.ac: diff --git a/modules/isfinite-tests b/modules/isfinite-tests index bf7964648b..16f4c8d187 100644 --- a/modules/isfinite-tests +++ b/modules/isfinite-tests @@ -1,7 +1,6 @@ Files: tests/test-isfinite.c tests/infinity.h -tests/nan.h tests/snan.h tests/macros.h m4/exponentf.m4 @@ -10,6 +9,7 @@ m4/exponentl.m4 Depends-on: float +nan configure.ac: gl_FLOAT_EXPONENT_LOCATION diff --git a/modules/isinf-tests b/modules/isinf-tests index fb958d74ea..caf77a88f9 100644 --- a/modules/isinf-tests +++ b/modules/isinf-tests @@ -1,7 +1,6 @@ Files: tests/test-isinf.c tests/infinity.h -tests/nan.h tests/snan.h tests/macros.h m4/exponentf.m4 @@ -10,6 +9,7 @@ m4/exponentl.m4 Depends-on: float +nan configure.ac: gl_FLOAT_EXPONENT_LOCATION diff --git a/modules/isnan-tests b/modules/isnan-tests index 06ebb72156..8da13c2349 100644 --- a/modules/isnan-tests +++ b/modules/isnan-tests @@ -2,7 +2,6 @@ Files: tests/test-isnan.c tests/minus-zero.h tests/infinity.h -tests/nan.h tests/snan.h tests/macros.h m4/exponentf.m4 @@ -11,6 +10,7 @@ m4/exponentl.m4 Depends-on: float +nan configure.ac: gl_FLOAT_EXPONENT_LOCATION diff --git a/modules/isnand-nolibm-tests b/modules/isnand-nolibm-tests index c8d92f3a75..b4fa23e9d9 100644 --- a/modules/isnand-nolibm-tests +++ b/modules/isnand-nolibm-tests @@ -3,12 +3,12 @@ tests/test-isnand-nolibm.c tests/test-isnand.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/snan.h tests/macros.h m4/exponentd.m4 Depends-on: +nan configure.ac: gl_DOUBLE_EXPONENT_LOCATION diff --git a/modules/isnand-tests b/modules/isnand-tests index 30a2c6f9e6..82f4d2e1dc 100644 --- a/modules/isnand-tests +++ b/modules/isnand-tests @@ -3,12 +3,12 @@ tests/test-isnand.c tests/test-isnand.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/snan.h tests/macros.h m4/exponentd.m4 Depends-on: +nan configure.ac: gl_DOUBLE_EXPONENT_LOCATION diff --git a/modules/isnanf-nolibm-tests b/modules/isnanf-nolibm-tests index acd8bd34bc..6dece6e5d9 100644 --- a/modules/isnanf-nolibm-tests +++ b/modules/isnanf-nolibm-tests @@ -3,12 +3,12 @@ tests/test-isnanf-nolibm.c tests/test-isnanf.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/snan.h tests/macros.h m4/exponentf.m4 Depends-on: +nan configure.ac: gl_FLOAT_EXPONENT_LOCATION diff --git a/modules/isnanf-tests b/modules/isnanf-tests index c094c02a37..464618c2f9 100644 --- a/modules/isnanf-tests +++ b/modules/isnanf-tests @@ -3,12 +3,12 @@ tests/test-isnanf.c tests/test-isnanf.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/snan.h tests/macros.h m4/exponentf.m4 Depends-on: +nan configure.ac: gl_FLOAT_EXPONENT_LOCATION diff --git a/modules/isnanl-nolibm-tests b/modules/isnanl-nolibm-tests index 58a0f51fa1..88a4ddfc9c 100644 --- a/modules/isnanl-nolibm-tests +++ b/modules/isnanl-nolibm-tests @@ -3,13 +3,13 @@ tests/test-isnanl-nolibm.c tests/test-isnanl.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/snan.h tests/macros.h m4/exponentl.m4 Depends-on: float +nan configure.ac: gl_LONG_DOUBLE_EXPONENT_LOCATION diff --git a/modules/isnanl-tests b/modules/isnanl-tests index 5a2d880c3f..24ea78471e 100644 --- a/modules/isnanl-tests +++ b/modules/isnanl-tests @@ -3,13 +3,13 @@ tests/test-isnanl.c tests/test-isnanl.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/snan.h tests/macros.h m4/exponentl.m4 Depends-on: float +nan configure.ac: gl_LONG_DOUBLE_EXPONENT_LOCATION diff --git a/modules/ldexp-ieee-tests b/modules/ldexp-ieee-tests index 83bd51b767..c8799bc7f4 100644 --- a/modules/ldexp-ieee-tests +++ b/modules/ldexp-ieee-tests @@ -3,12 +3,12 @@ tests/test-ldexp-ieee.c tests/test-ldexp-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnand-nolibm float +nan signbit configure.ac: diff --git a/modules/ldexp-tests b/modules/ldexp-tests index 2db1a43a97..153f3356ac 100644 --- a/modules/ldexp-tests +++ b/modules/ldexp-tests @@ -3,7 +3,6 @@ tests/test-ldexp.c tests/test-ldexp.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/signature.h tests/macros.h tests/randomd.c @@ -12,6 +11,7 @@ Depends-on: isnand-nolibm signbit float +nan configure.ac: diff --git a/modules/ldexpf-ieee-tests b/modules/ldexpf-ieee-tests index be1add9659..7679569ca3 100644 --- a/modules/ldexpf-ieee-tests +++ b/modules/ldexpf-ieee-tests @@ -3,12 +3,12 @@ tests/test-ldexpf-ieee.c tests/test-ldexp-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanf-nolibm float +nan signbit configure.ac: diff --git a/modules/ldexpf-tests b/modules/ldexpf-tests index 80ee90d6d6..5ed0f38006 100644 --- a/modules/ldexpf-tests +++ b/modules/ldexpf-tests @@ -3,7 +3,6 @@ tests/test-ldexpf.c tests/test-ldexp.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/signature.h tests/macros.h tests/randomf.c @@ -12,6 +11,7 @@ Depends-on: isnanf-nolibm signbit float +nan configure.ac: diff --git a/modules/ldexpl-ieee-tests b/modules/ldexpl-ieee-tests index f8461319b6..85a4bc363a 100644 --- a/modules/ldexpl-ieee-tests +++ b/modules/ldexpl-ieee-tests @@ -3,12 +3,12 @@ tests/test-ldexpl-ieee.c tests/test-ldexp-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanl-nolibm float +nan signbit configure.ac: diff --git a/modules/ldexpl-tests b/modules/ldexpl-tests index c160d40686..e50f1c6424 100644 --- a/modules/ldexpl-tests +++ b/modules/ldexpl-tests @@ -3,7 +3,6 @@ tests/test-ldexpl.c tests/test-ldexp.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/signature.h tests/macros.h tests/randoml.c @@ -13,6 +12,7 @@ fpucw isnanl-nolibm signbit float +nan configure.ac: diff --git a/modules/log-ieee-tests b/modules/log-ieee-tests index 0debcea9e4..efe54b1010 100644 --- a/modules/log-ieee-tests +++ b/modules/log-ieee-tests @@ -3,12 +3,12 @@ tests/test-log-ieee.c tests/test-log-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnand-nolibm float +nan signbit configure.ac: diff --git a/modules/log10-ieee-tests b/modules/log10-ieee-tests index 147d53d74b..e8a324d77f 100644 --- a/modules/log10-ieee-tests +++ b/modules/log10-ieee-tests @@ -3,12 +3,12 @@ tests/test-log10-ieee.c tests/test-log10-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnand-nolibm float +nan signbit configure.ac: diff --git a/modules/log10f-ieee-tests b/modules/log10f-ieee-tests index dc81a66982..6f6ef15bb8 100644 --- a/modules/log10f-ieee-tests +++ b/modules/log10f-ieee-tests @@ -3,12 +3,12 @@ tests/test-log10f-ieee.c tests/test-log10-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanf-nolibm float +nan signbit configure.ac: diff --git a/modules/log10l-ieee-tests b/modules/log10l-ieee-tests index 9b19f3c403..0f84dc394c 100644 --- a/modules/log10l-ieee-tests +++ b/modules/log10l-ieee-tests @@ -3,12 +3,12 @@ tests/test-log10l-ieee.c tests/test-log10-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanl-nolibm float +nan signbit configure.ac: diff --git a/modules/log1p-ieee-tests b/modules/log1p-ieee-tests index dea76b485a..a7f2a21c0a 100644 --- a/modules/log1p-ieee-tests +++ b/modules/log1p-ieee-tests @@ -3,12 +3,12 @@ tests/test-log1p-ieee.c tests/test-log1p-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnand-nolibm float +nan signbit configure.ac: diff --git a/modules/log1pf-ieee-tests b/modules/log1pf-ieee-tests index 5eca5eb1bd..ed67ba6513 100644 --- a/modules/log1pf-ieee-tests +++ b/modules/log1pf-ieee-tests @@ -3,12 +3,12 @@ tests/test-log1pf-ieee.c tests/test-log1p-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanf-nolibm float +nan signbit configure.ac: diff --git a/modules/log1pl-ieee-tests b/modules/log1pl-ieee-tests index d283656e04..64179fb2fd 100644 --- a/modules/log1pl-ieee-tests +++ b/modules/log1pl-ieee-tests @@ -3,12 +3,12 @@ tests/test-log1pl-ieee.c tests/test-log1p-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanl-nolibm float +nan signbit configure.ac: diff --git a/modules/log2-ieee-tests b/modules/log2-ieee-tests index 8178a4d940..5a9b91bf69 100644 --- a/modules/log2-ieee-tests +++ b/modules/log2-ieee-tests @@ -3,12 +3,12 @@ tests/test-log2-ieee.c tests/test-log2-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnand-nolibm float +nan signbit configure.ac: diff --git a/modules/log2f-ieee-tests b/modules/log2f-ieee-tests index 8900a2c349..b9be57e457 100644 --- a/modules/log2f-ieee-tests +++ b/modules/log2f-ieee-tests @@ -3,12 +3,12 @@ tests/test-log2f-ieee.c tests/test-log2-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanf-nolibm float +nan signbit configure.ac: diff --git a/modules/log2l-ieee-tests b/modules/log2l-ieee-tests index e6a472371d..46c1100d38 100644 --- a/modules/log2l-ieee-tests +++ b/modules/log2l-ieee-tests @@ -3,12 +3,12 @@ tests/test-log2l-ieee.c tests/test-log2-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanl-nolibm float +nan signbit configure.ac: diff --git a/modules/logb-ieee-tests b/modules/logb-ieee-tests index c12b2cbd8c..3c6b33802c 100644 --- a/modules/logb-ieee-tests +++ b/modules/logb-ieee-tests @@ -3,12 +3,12 @@ tests/test-logb-ieee.c tests/test-logb-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnand-nolibm float +nan signbit configure.ac: diff --git a/modules/logbf-ieee-tests b/modules/logbf-ieee-tests index fa55cc5aec..98fdb474c4 100644 --- a/modules/logbf-ieee-tests +++ b/modules/logbf-ieee-tests @@ -3,12 +3,12 @@ tests/test-logbf-ieee.c tests/test-logb-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanf-nolibm float +nan signbit configure.ac: diff --git a/modules/logbl-ieee-tests b/modules/logbl-ieee-tests index 87f2156ea2..bf35787602 100644 --- a/modules/logbl-ieee-tests +++ b/modules/logbl-ieee-tests @@ -3,12 +3,12 @@ tests/test-logbl-ieee.c tests/test-logb-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanl-nolibm float +nan signbit configure.ac: diff --git a/modules/logf-ieee-tests b/modules/logf-ieee-tests index 71c515ac00..82b6c0f3a0 100644 --- a/modules/logf-ieee-tests +++ b/modules/logf-ieee-tests @@ -3,12 +3,12 @@ tests/test-logf-ieee.c tests/test-log-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanf-nolibm float +nan signbit configure.ac: diff --git a/modules/logl-ieee-tests b/modules/logl-ieee-tests index 28962c4e57..916ae0d20d 100644 --- a/modules/logl-ieee-tests +++ b/modules/logl-ieee-tests @@ -3,12 +3,12 @@ tests/test-logl-ieee.c tests/test-log-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanl-nolibm float +nan signbit configure.ac: diff --git a/modules/modf-ieee-tests b/modules/modf-ieee-tests index 3dc596980b..575a48502d 100644 --- a/modules/modf-ieee-tests +++ b/modules/modf-ieee-tests @@ -3,12 +3,12 @@ tests/test-modf-ieee.c tests/test-modf-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnand-nolibm float +nan signbit configure.ac: diff --git a/modules/modff-ieee-tests b/modules/modff-ieee-tests index 17063a5356..bfc9278516 100644 --- a/modules/modff-ieee-tests +++ b/modules/modff-ieee-tests @@ -3,12 +3,12 @@ tests/test-modff-ieee.c tests/test-modf-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanf-nolibm float +nan signbit configure.ac: diff --git a/modules/modfl-ieee-tests b/modules/modfl-ieee-tests index 2bf16fee17..d20023ba7d 100644 --- a/modules/modfl-ieee-tests +++ b/modules/modfl-ieee-tests @@ -3,12 +3,12 @@ tests/test-modfl-ieee.c tests/test-modf-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanl-nolibm float +nan signbit configure.ac: diff --git a/modules/nan b/modules/nan new file mode 100644 index 0000000000..18165c0a28 --- /dev/null +++ b/modules/nan @@ -0,0 +1,23 @@ +Description: +Macros for quiet not-a-number. + +Files: +lib/nan.h + +Depends-on: + +configure.ac: + +Makefile.am: +lib_SOURCES += nan.h + +Include: +"nan.h" + +Link: + +License: +GPL + +Maintainer: +all diff --git a/modules/remainder-ieee-tests b/modules/remainder-ieee-tests index 867e0f768f..da09540328 100644 --- a/modules/remainder-ieee-tests +++ b/modules/remainder-ieee-tests @@ -3,12 +3,12 @@ tests/test-remainder-ieee.c tests/test-remainder-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnand-nolibm float +nan signbit configure.ac: diff --git a/modules/remainderf-ieee-tests b/modules/remainderf-ieee-tests index acda164199..7ab236ebd4 100644 --- a/modules/remainderf-ieee-tests +++ b/modules/remainderf-ieee-tests @@ -3,12 +3,12 @@ tests/test-remainderf-ieee.c tests/test-remainder-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanf-nolibm float +nan signbit configure.ac: diff --git a/modules/remainderl-ieee-tests b/modules/remainderl-ieee-tests index 1ebbcc3066..1e4cab4337 100644 --- a/modules/remainderl-ieee-tests +++ b/modules/remainderl-ieee-tests @@ -3,12 +3,12 @@ tests/test-remainderl-ieee.c tests/test-remainder-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanl-nolibm float +nan signbit configure.ac: diff --git a/modules/rint-ieee-tests b/modules/rint-ieee-tests index ff17f28d73..3bf94eb48f 100644 --- a/modules/rint-ieee-tests +++ b/modules/rint-ieee-tests @@ -3,12 +3,12 @@ tests/test-rint-ieee.c tests/test-rint-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnand-nolibm float +nan signbit configure.ac: diff --git a/modules/rint-tests b/modules/rint-tests index 1b0232f760..108d3cf936 100644 --- a/modules/rint-tests +++ b/modules/rint-tests @@ -3,13 +3,13 @@ tests/test-rint.c tests/test-rint.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/signature.h tests/macros.h tests/randomd.c Depends-on: isnand-nolibm +nan configure.ac: diff --git a/modules/rintf-ieee-tests b/modules/rintf-ieee-tests index 87ae29c0dd..ab8b83a765 100644 --- a/modules/rintf-ieee-tests +++ b/modules/rintf-ieee-tests @@ -3,12 +3,12 @@ tests/test-rintf-ieee.c tests/test-rint-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanf-nolibm float +nan signbit configure.ac: diff --git a/modules/rintf-tests b/modules/rintf-tests index d72ce79167..96d236c33e 100644 --- a/modules/rintf-tests +++ b/modules/rintf-tests @@ -3,13 +3,13 @@ tests/test-rintf.c tests/test-rint.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/signature.h tests/macros.h tests/randomf.c Depends-on: isnanf-nolibm +nan configure.ac: diff --git a/modules/rintl-ieee-tests b/modules/rintl-ieee-tests index bc5dfa9a74..a74e6ea3eb 100644 --- a/modules/rintl-ieee-tests +++ b/modules/rintl-ieee-tests @@ -3,12 +3,12 @@ tests/test-rintl-ieee.c tests/test-rint-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanl-nolibm float +nan signbit configure.ac: diff --git a/modules/rintl-tests b/modules/rintl-tests index 32dd4b4257..576fffcc4b 100644 --- a/modules/rintl-tests +++ b/modules/rintl-tests @@ -3,7 +3,6 @@ tests/test-rintl.c tests/test-rint.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/signature.h tests/macros.h tests/randoml.c @@ -12,6 +11,7 @@ Depends-on: fpucw isnanl-nolibm float +nan configure.ac: diff --git a/modules/round-ieee-tests b/modules/round-ieee-tests index f74d57bfa4..1aca2fcbe5 100644 --- a/modules/round-ieee-tests +++ b/modules/round-ieee-tests @@ -2,12 +2,12 @@ Files: tests/test-round-ieee.c tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnand-nolibm float +nan signbit configure.ac: diff --git a/modules/round-tests b/modules/round-tests index 6a0de71cf7..358ddacfbe 100644 --- a/modules/round-tests +++ b/modules/round-tests @@ -3,13 +3,13 @@ tests/test-round1.c tests/test-round2.c tests/minus-zero.h tests/infinity.h -tests/nan.h tests/signature.h tests/macros.h Depends-on: assert-h isnand-nolibm +nan stdbool stdint diff --git a/modules/roundf-ieee-tests b/modules/roundf-ieee-tests index 1d283adb29..5721f8156c 100644 --- a/modules/roundf-ieee-tests +++ b/modules/roundf-ieee-tests @@ -2,12 +2,12 @@ Files: tests/test-roundf-ieee.c tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanf-nolibm float +nan signbit configure.ac: diff --git a/modules/roundf-tests b/modules/roundf-tests index 29f06e45c2..6638dc3ed8 100644 --- a/modules/roundf-tests +++ b/modules/roundf-tests @@ -4,7 +4,6 @@ tests/test-round2.c tests/test-roundf2.c tests/minus-zero.h tests/infinity.h -tests/nan.h tests/signature.h tests/macros.h @@ -13,6 +12,7 @@ assert-h ceilf floorf isnanf-nolibm +nan stdbool stdint diff --git a/modules/roundl-ieee-tests b/modules/roundl-ieee-tests index fe624ba8e2..40885dcf8e 100644 --- a/modules/roundl-ieee-tests +++ b/modules/roundl-ieee-tests @@ -2,12 +2,12 @@ Files: tests/test-roundl-ieee.c tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanl-nolibm float +nan signbit configure.ac: diff --git a/modules/roundl-tests b/modules/roundl-tests index 7e7aca3b98..3d61ca1cf8 100644 --- a/modules/roundl-tests +++ b/modules/roundl-tests @@ -2,7 +2,6 @@ Files: tests/test-roundl.c tests/minus-zero.h tests/infinity.h -tests/nan.h tests/signature.h tests/macros.h @@ -10,6 +9,7 @@ Depends-on: fpucw isnanl-nolibm float +nan configure.ac: diff --git a/modules/signbit-tests b/modules/signbit-tests index 3b3ef9b6b6..6e414ea4f2 100644 --- a/modules/signbit-tests +++ b/modules/signbit-tests @@ -2,7 +2,6 @@ Files: tests/test-signbit.c tests/minus-zero.h tests/infinity.h -tests/nan.h tests/qnan.h tests/snan.h tests/macros.h @@ -12,6 +11,7 @@ m4/exponentl.m4 Depends-on: float +nan configure.ac: AC_REQUIRE([gl_FLOAT_EXPONENT_LOCATION]) diff --git a/modules/snprintf-posix-tests b/modules/snprintf-posix-tests index 0f7257e648..9369b63373 100644 --- a/modules/snprintf-posix-tests +++ b/modules/snprintf-posix-tests @@ -4,13 +4,13 @@ tests/test-snprintf-posix.h tests/test-snprintf.c tests/minus-zero.h tests/infinity.h -tests/nan.h tests/signature.h tests/macros.h Depends-on: stdint float +nan configure.ac: AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) diff --git a/modules/sprintf-posix-tests b/modules/sprintf-posix-tests index ba23199a07..ff6b4163cc 100644 --- a/modules/sprintf-posix-tests +++ b/modules/sprintf-posix-tests @@ -3,13 +3,13 @@ tests/test-sprintf-posix.c tests/test-sprintf-posix.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/signature.h tests/macros.h Depends-on: stdint float +nan configure.ac: AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) diff --git a/modules/sqrt-ieee-tests b/modules/sqrt-ieee-tests index aaeb544151..21c89cbde8 100644 --- a/modules/sqrt-ieee-tests +++ b/modules/sqrt-ieee-tests @@ -3,12 +3,12 @@ tests/test-sqrt-ieee.c tests/test-sqrt-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnand-nolibm float +nan signbit configure.ac: diff --git a/modules/sqrtf-ieee-tests b/modules/sqrtf-ieee-tests index c1b88f6172..2c130fb86e 100644 --- a/modules/sqrtf-ieee-tests +++ b/modules/sqrtf-ieee-tests @@ -3,12 +3,12 @@ tests/test-sqrtf-ieee.c tests/test-sqrt-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanf-nolibm float +nan signbit configure.ac: diff --git a/modules/sqrtl-ieee-tests b/modules/sqrtl-ieee-tests index 85141fa9f0..6e5dbe9884 100644 --- a/modules/sqrtl-ieee-tests +++ b/modules/sqrtl-ieee-tests @@ -3,12 +3,12 @@ tests/test-sqrtl-ieee.c tests/test-sqrt-ieee.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanl-nolibm float +nan signbit configure.ac: diff --git a/modules/stdio-tests b/modules/stdio-tests index 84199d5aa3..f0dc1d054f 100644 --- a/modules/stdio-tests +++ b/modules/stdio-tests @@ -1,6 +1,5 @@ Files: tests/test-stdio.c -tests/nan.h tests/qnan.h tests/snan.h tests/macros.h @@ -8,6 +7,7 @@ m4/exponentd.m4 Depends-on: assert-h +nan stdio-c++-tests fgetc-tests fputc-tests diff --git a/modules/totalorder-tests b/modules/totalorder-tests index 43eff42e7a..6bddc21593 100644 --- a/modules/totalorder-tests +++ b/modules/totalorder-tests @@ -2,11 +2,11 @@ Files: tests/test-totalorder.c tests/minus-zero.h tests/infinity.h -tests/nan.h tests/qnan.h tests/macros.h Depends-on: +nan signbit configure.ac: diff --git a/modules/totalorderf-tests b/modules/totalorderf-tests index 581e3e8cc2..688536be81 100644 --- a/modules/totalorderf-tests +++ b/modules/totalorderf-tests @@ -3,11 +3,11 @@ tests/test-totalorderf.c tests/test-totalorder.c tests/minus-zero.h tests/infinity.h -tests/nan.h tests/qnan.h tests/macros.h Depends-on: +nan signbit configure.ac: diff --git a/modules/totalorderl-tests b/modules/totalorderl-tests index c443fcc525..1502a9d5ce 100644 --- a/modules/totalorderl-tests +++ b/modules/totalorderl-tests @@ -3,11 +3,11 @@ tests/test-totalorderl.c tests/test-totalorder.c tests/minus-zero.h tests/infinity.h -tests/nan.h tests/qnan.h tests/macros.h Depends-on: +nan signbit configure.ac: diff --git a/modules/trunc-ieee-tests b/modules/trunc-ieee-tests index 3299a7bbf0..5a7919879a 100644 --- a/modules/trunc-ieee-tests +++ b/modules/trunc-ieee-tests @@ -2,12 +2,12 @@ Files: tests/test-trunc-ieee.c tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnand-nolibm float +nan signbit configure.ac: diff --git a/modules/trunc-tests b/modules/trunc-tests index 1ec87d7c57..8822e797ac 100644 --- a/modules/trunc-tests +++ b/modules/trunc-tests @@ -3,13 +3,13 @@ tests/test-trunc1.c tests/test-trunc2.c tests/minus-zero.h tests/infinity.h -tests/nan.h tests/signature.h tests/macros.h Depends-on: float isnand-nolibm +nan stdbool stdint diff --git a/modules/truncf-ieee-tests b/modules/truncf-ieee-tests index edb3b1333c..1595d6cdf0 100644 --- a/modules/truncf-ieee-tests +++ b/modules/truncf-ieee-tests @@ -2,12 +2,12 @@ Files: tests/test-truncf-ieee.c tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: isnanf-nolibm float +nan signbit configure.ac: diff --git a/modules/truncf-tests b/modules/truncf-tests index 1c847e7bfc..be5623a398 100644 --- a/modules/truncf-tests +++ b/modules/truncf-tests @@ -3,13 +3,13 @@ tests/test-truncf1.c tests/test-truncf2.c tests/minus-zero.h tests/infinity.h -tests/nan.h tests/signature.h tests/macros.h Depends-on: float isnanf-nolibm +nan stdbool stdint diff --git a/modules/truncl-ieee-tests b/modules/truncl-ieee-tests index 478e9b1448..8b33cd45ff 100644 --- a/modules/truncl-ieee-tests +++ b/modules/truncl-ieee-tests @@ -2,13 +2,13 @@ Files: tests/test-truncl-ieee.c tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: fpucw isnanl-nolibm float +nan signbit configure.ac: diff --git a/modules/truncl-tests b/modules/truncl-tests index f6b7dd3944..466f8c97d5 100644 --- a/modules/truncl-tests +++ b/modules/truncl-tests @@ -2,7 +2,6 @@ Files: tests/test-truncl.c tests/minus-zero.h tests/infinity.h -tests/nan.h tests/signature.h tests/macros.h @@ -10,6 +9,7 @@ Depends-on: fpucw isnanl-nolibm float +nan configure.ac: diff --git a/modules/vasnprintf-posix-tests b/modules/vasnprintf-posix-tests index b9aabe665f..4880abff43 100644 --- a/modules/vasnprintf-posix-tests +++ b/modules/vasnprintf-posix-tests @@ -5,7 +5,6 @@ tests/test-vasnprintf-posix2.c tests/test-vasnprintf-posix3.c tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h m4/locale-fr.m4 m4/codeset.m4 @@ -13,6 +12,7 @@ m4/codeset.m4 Depends-on: stdint float +nan setlocale configure.ac: diff --git a/modules/vasnwprintf-posix-tests b/modules/vasnwprintf-posix-tests index 4a693a1b98..ec90686c93 100644 --- a/modules/vasnwprintf-posix-tests +++ b/modules/vasnwprintf-posix-tests @@ -5,7 +5,6 @@ tests/test-vasnwprintf-posix2.c tests/test-vasnwprintf-posix3.c tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h m4/musl.m4 m4/locale-fr.m4 @@ -14,6 +13,7 @@ m4/codeset.m4 Depends-on: stdint float +nan setlocale wcscmp wcsspn diff --git a/modules/vasprintf-posix-tests b/modules/vasprintf-posix-tests index ae486a7672..144a192275 100644 --- a/modules/vasprintf-posix-tests +++ b/modules/vasprintf-posix-tests @@ -2,12 +2,12 @@ Files: tests/test-vasprintf-posix.c tests/minus-zero.h tests/infinity.h -tests/nan.h tests/macros.h Depends-on: stdint float +nan configure.ac: AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) diff --git a/modules/vsnprintf-posix-tests b/modules/vsnprintf-posix-tests index 645c581cb3..4e1b497b7b 100644 --- a/modules/vsnprintf-posix-tests +++ b/modules/vsnprintf-posix-tests @@ -4,13 +4,13 @@ tests/test-snprintf-posix.h tests/test-vsnprintf.c tests/minus-zero.h tests/infinity.h -tests/nan.h tests/signature.h tests/macros.h Depends-on: stdint float +nan configure.ac: AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) diff --git a/modules/vsprintf-posix-tests b/modules/vsprintf-posix-tests index c8c8bafaf0..05483d9f46 100644 --- a/modules/vsprintf-posix-tests +++ b/modules/vsprintf-posix-tests @@ -3,13 +3,13 @@ tests/test-vsprintf-posix.c tests/test-sprintf-posix.h tests/minus-zero.h tests/infinity.h -tests/nan.h tests/signature.h tests/macros.h Depends-on: stdint float +nan configure.ac: AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) diff --git a/tests/nan.h b/tests/nan.h deleted file mode 100644 index 3ba41d8de9..0000000000 --- a/tests/nan.h +++ /dev/null @@ -1,91 +0,0 @@ -/* Macros for quiet 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 . */ - -#ifndef _TESTS_NAN_H -#define _TESTS_NAN_H - - -/* IBM z/OS supports both hexadecimal and IEEE floating-point formats. The - former does not support NaN and its isnan() implementation returns zero - for all values. */ -#if defined __MVS__ && defined __IBMC__ && !defined __BFP__ -# error "NaN is not supported with IBM's hexadecimal floating-point format; please re-compile with -qfloat=ieee" -#endif - -/* NaNf () returns a 'float' not-a-number. */ - -/* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler choke - on the expression 0.0 / 0.0. The IBM XL C compiler on z/OS complains. - PGI 16.10 complains. */ -#if (defined __DECC || defined _MSC_VER \ - || (defined __MVS__ && defined __IBMC__) \ - || defined __PGI) -static float -NaNf () -{ - static float zero = 0.0f; - return zero / zero; -} -#else -# define NaNf() (0.0f / 0.0f) -#endif - - -/* NaNd () returns a 'double' not-a-number. */ - -/* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler choke - on the expression 0.0 / 0.0. The IBM XL C compiler on z/OS complains. - PGI 16.10 complains. */ -#if (defined __DECC || defined _MSC_VER \ - || (defined __MVS__ && defined __IBMC__) \ - || defined __PGI) -static double -NaNd () -{ - static double zero = 0.0; - return zero / zero; -} -#else -# define NaNd() (0.0 / 0.0) -#endif - - -/* NaNl () returns a 'long double' not-a-number. */ - -/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the - runtime type conversion. - The Microsoft MSVC 9 compiler chokes on the expression 0.0L / 0.0L. - The IBM XL C compiler on z/OS complains. - PGI 16.10 complains. */ -#ifdef __sgi -static long double NaNl () -{ - double zero = 0.0; - return zero / zero; -} -#elif defined _MSC_VER || (defined __MVS__ && defined __IBMC__) || defined __PGI -static long double -NaNl () -{ - static long double zero = 0.0L; - return zero / zero; -} -#else -# define NaNl() (0.0L / 0.0L) -#endif - - -#endif /* _TESTS_NAN_H */