]> git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/generic/math-tests.h
New <math.h> macro named issignaling to check for a signaling NaN (sNaN).
[thirdparty/glibc.git] / sysdeps / generic / math-tests.h
1 /* Configuration for math tests. Generic version.
2 Copyright (C) 2013 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19 /* Indicate whether to run tests involving sNaN values for the float, double,
20 and long double C data types, respectively. All are run unless
21 overridden. */
22 #ifndef SNAN_TESTS_float
23 # define SNAN_TESTS_float 1
24 #endif
25 #ifndef SNAN_TESTS_double
26 # define SNAN_TESTS_double 1
27 #endif
28 #ifndef SNAN_TESTS_long_double
29 # define SNAN_TESTS_long_double 1
30 #endif
31
32 /* Return nonzero value if to run tests involving sNaN values for X. */
33 #define SNAN_TESTS(x) \
34 (sizeof (x) == sizeof (float) ? SNAN_TESTS_float \
35 : sizeof (x) == sizeof (double) ? SNAN_TESTS_double \
36 : SNAN_TESTS_long_double)
37
38 /* Indicate whether to run tests involving type casts of sNaN values. These
39 are run unless overridden. */
40 #ifndef SNAN_TESTS_TYPE_CAST
41 # define SNAN_TESTS_TYPE_CAST 1
42 #endif