diff options
Diffstat (limited to 'math')
-rw-r--r-- | math/libm-test.inc | 54 |
1 files changed, 53 insertions, 1 deletions
diff --git a/math/libm-test.inc b/math/libm-test.inc index 85df9deb86..9123dcfc48 100644 --- a/math/libm-test.inc +++ b/math/libm-test.inc @@ -11090,6 +11090,10 @@ static const struct test_ff_f_data pow_test_data[] = TEST_ff_f (pow, -qnan_value, 0, 1, ERRNO_UNCHANGED|NO_TEST_MATHVEC), TEST_ff_f (pow, qnan_value, minus_zero, 1, ERRNO_UNCHANGED|NO_TEST_MATHVEC), TEST_ff_f (pow, -qnan_value, minus_zero, 1, ERRNO_UNCHANGED|NO_TEST_MATHVEC), + TEST_ff_f (pow, snan_value, 0, qnan_value, INVALID_EXCEPTION|NO_TEST_MATHVEC), + TEST_ff_f (pow, -snan_value, 0, qnan_value, INVALID_EXCEPTION|NO_TEST_MATHVEC), + TEST_ff_f (pow, snan_value, minus_zero, qnan_value, INVALID_EXCEPTION|NO_TEST_MATHVEC), + TEST_ff_f (pow, -snan_value, minus_zero, qnan_value, INVALID_EXCEPTION|NO_TEST_MATHVEC), TEST_ff_f (pow, 1.1L, plus_infty, plus_infty, ERRNO_UNCHANGED|NO_TEST_INLINE), TEST_ff_f (pow, plus_infty, plus_infty, plus_infty, ERRNO_UNCHANGED|NO_TEST_INLINE), @@ -11151,18 +11155,40 @@ static const struct test_ff_f_data pow_test_data[] = TEST_ff_f (pow, qnan_value, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), TEST_ff_f (pow, -qnan_value, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), TEST_ff_f (pow, -qnan_value, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_ff_f (pow, qnan_value, snan_value, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, qnan_value, -snan_value, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, -qnan_value, snan_value, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, -qnan_value, -snan_value, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, snan_value, qnan_value, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, snan_value, -qnan_value, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, -snan_value, qnan_value, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, -snan_value, -qnan_value, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, snan_value, snan_value, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, snan_value, -snan_value, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, -snan_value, snan_value, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, -snan_value, -snan_value, qnan_value, INVALID_EXCEPTION), TEST_ff_f (pow, 0, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), TEST_ff_f (pow, 0, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_ff_f (pow, 0, snan_value, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, 0, -snan_value, qnan_value, INVALID_EXCEPTION), TEST_ff_f (pow, 1, qnan_value, 1, ERRNO_UNCHANGED), TEST_ff_f (pow, 1, -qnan_value, 1, ERRNO_UNCHANGED), + TEST_ff_f (pow, 1, snan_value, qnan_value, INVALID_EXCEPTION|NO_TEST_MATHVEC), + TEST_ff_f (pow, 1, -snan_value, qnan_value, INVALID_EXCEPTION|NO_TEST_MATHVEC), TEST_ff_f (pow, -1, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), TEST_ff_f (pow, -1, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_ff_f (pow, -1, snan_value, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, -1, -snan_value, qnan_value, INVALID_EXCEPTION), TEST_ff_f (pow, qnan_value, 1, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), TEST_ff_f (pow, -qnan_value, 1, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_ff_f (pow, snan_value, 1, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, -snan_value, 1, qnan_value, INVALID_EXCEPTION), TEST_ff_f (pow, qnan_value, -1, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), TEST_ff_f (pow, -qnan_value, -1, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_ff_f (pow, snan_value, -1, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, -snan_value, -1, qnan_value, INVALID_EXCEPTION), - /* pow (x, qNaN) == qNaN. */ + /* pow (x, qNaN or sNaN) == qNaN. */ TEST_ff_f (pow, 3.0, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), TEST_ff_f (pow, 3.0, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), TEST_ff_f (pow, minus_zero, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), @@ -11173,6 +11199,16 @@ static const struct test_ff_f_data pow_test_data[] = TEST_ff_f (pow, -3.0, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), TEST_ff_f (pow, minus_infty, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), TEST_ff_f (pow, minus_infty, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_ff_f (pow, 3.0, snan_value, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, 3.0, -snan_value, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, minus_zero, snan_value, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, minus_zero, -snan_value, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, plus_infty, snan_value, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, plus_infty, -snan_value, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, -3.0, snan_value, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, -3.0, -snan_value, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, minus_infty, snan_value, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, minus_infty, -snan_value, qnan_value, INVALID_EXCEPTION), TEST_ff_f (pow, qnan_value, 3.0, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), TEST_ff_f (pow, -qnan_value, 3.0, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), @@ -11190,6 +11226,22 @@ static const struct test_ff_f_data pow_test_data[] = TEST_ff_f (pow, -qnan_value, min_subnorm_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), TEST_ff_f (pow, qnan_value, -min_subnorm_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), TEST_ff_f (pow, -qnan_value, -min_subnorm_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_ff_f (pow, snan_value, 3.0, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, -snan_value, 3.0, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, snan_value, -3.0, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, -snan_value, -3.0, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, snan_value, plus_infty, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, -snan_value, plus_infty, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, snan_value, minus_infty, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, -snan_value, minus_infty, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, snan_value, 2.5, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, -snan_value, 2.5, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, snan_value, -2.5, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, -snan_value, -2.5, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, snan_value, min_subnorm_value, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, -snan_value, min_subnorm_value, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, snan_value, -min_subnorm_value, qnan_value, INVALID_EXCEPTION), + TEST_ff_f (pow, -snan_value, -min_subnorm_value, qnan_value, INVALID_EXCEPTION), TEST_ff_f (pow, 1, plus_infty, 1, ERRNO_UNCHANGED), TEST_ff_f (pow, -1, plus_infty, 1, ERRNO_UNCHANGED), |