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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user