2013-03-19 09:16:49 +00:00
|
|
|
/* Configuration for math tests. Generic version.
|
2018-01-01 00:32:25 +00:00
|
|
|
Copyright (C) 2013-2018 Free Software Foundation, Inc.
|
2013-03-19 09:16:49 +00:00
|
|
|
This file is part of the GNU C Library.
|
|
|
|
|
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Lesser General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2.1 of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
The GNU C Library 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
|
|
|
|
Lesser General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
|
|
License along with the GNU C Library; if not, see
|
|
|
|
<http://www.gnu.org/licenses/>. */
|
|
|
|
|
2017-06-22 23:03:38 +00:00
|
|
|
#include <bits/floatn.h>
|
|
|
|
|
|
|
|
/* Expand the appropriate macro for whether to enable tests for a
|
|
|
|
given type. */
|
|
|
|
#if __HAVE_DISTINCT_FLOAT128
|
|
|
|
# define MATH_TESTS_TG(PREFIX, ARGS, TYPE) \
|
|
|
|
(sizeof (TYPE) == sizeof (float) ? PREFIX ## float ARGS \
|
|
|
|
: sizeof (TYPE) == sizeof (double) ? PREFIX ## double ARGS \
|
|
|
|
: __builtin_types_compatible_p (TYPE, _Float128) ? PREFIX ## float128 ARGS \
|
|
|
|
: PREFIX ## long_double ARGS)
|
|
|
|
# else
|
|
|
|
# define MATH_TESTS_TG(PREFIX, ARGS, TYPE) \
|
|
|
|
(sizeof (TYPE) == sizeof (float) ? PREFIX ## float ARGS \
|
|
|
|
: sizeof (TYPE) == sizeof (double) ? PREFIX ## double ARGS \
|
|
|
|
: PREFIX ## long_double ARGS)
|
|
|
|
#endif
|
|
|
|
|
2013-03-19 09:16:49 +00:00
|
|
|
/* Return nonzero value if to run tests involving sNaN values for X. */
|
2017-06-22 23:03:38 +00:00
|
|
|
#define SNAN_TESTS(x) MATH_TESTS_TG (SNAN_TESTS_, , x)
|
2013-04-02 11:51:02 +00:00
|
|
|
|
2017-06-22 23:03:38 +00:00
|
|
|
#define ROUNDING_TESTS(TYPE, MODE) \
|
|
|
|
MATH_TESTS_TG (ROUNDING_TESTS_, (MODE), TYPE)
|
2013-06-11 15:44:31 +00:00
|
|
|
|
2017-06-22 23:03:38 +00:00
|
|
|
#define EXCEPTION_TESTS(TYPE) MATH_TESTS_TG (EXCEPTION_TESTS_, , TYPE)
|
2014-04-17 08:39:27 +00:00
|
|
|
|
2018-08-23 23:41:13 +00:00
|
|
|
#include <math-tests-exceptions.h>
|
2018-08-22 12:25:50 +00:00
|
|
|
#include <math-tests-rounding.h>
|
2018-08-10 19:22:01 +00:00
|
|
|
#include <math-tests-snan.h>
|
2018-08-01 11:18:57 +00:00
|
|
|
#include <math-tests-snan-cast.h>
|
2018-08-01 11:21:16 +00:00
|
|
|
#include <math-tests-snan-payload.h>
|
2018-08-24 19:18:16 +00:00
|
|
|
#include <math-tests-trap.h>
|
2018-08-27 18:52:41 +00:00
|
|
|
#include <math-tests-trap-force.h>
|