1
0
mirror of https://sourceware.org/git/glibc.git synced 2026-01-06 11:51:29 +03:00

Add rounding mode information to math-tests.h and use it in libm-test.inc.

This commit is contained in:
Joseph Myers
2013-06-10 12:34:49 +00:00
parent 50b818bf96
commit 0efa6f8b99
5 changed files with 71 additions and 4 deletions

View File

@@ -40,3 +40,21 @@
#ifndef SNAN_TESTS_TYPE_CAST
# define SNAN_TESTS_TYPE_CAST 1
#endif
/* Indicate whether to run tests involving a given rounding mode for a
given floating-point type, given that fesetround succeeds for that
mode. All are run if fesetround succeeds unless overridden. */
#ifndef ROUNDING_TESTS_float
# define ROUNDING_TESTS_float(MODE) 1
#endif
#ifndef ROUNDING_TESTS_double
# define ROUNDING_TESTS_double(MODE) 1
#endif
#ifndef ROUNDING_TESTS_long_double
# define ROUNDING_TESTS_long_double(MODE) 1
#endif
#define ROUNDING_TESTS(TYPE, MODE) \
(sizeof (TYPE) == sizeof (float) ? ROUNDING_TESTS_float (MODE) \
: sizeof (TYPE) == sizeof (double) ? ROUNDING_TESTS_double (MODE) \
: ROUNDING_TESTS_long_double (MODE))