diff options
Diffstat (limited to 'math')
-rw-r--r-- | math/libm-test.inc | 143 |
1 files changed, 71 insertions, 72 deletions
diff --git a/math/libm-test.inc b/math/libm-test.inc index 7334a48577..ad97da1cc0 100644 --- a/math/libm-test.inc +++ b/math/libm-test.inc @@ -6078,14 +6078,13 @@ static const struct test_f_f_data ceil_test_data[] = TEST_f_f (ceil, snan_value, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION), TEST_f_f (ceil, -snan_value, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION), - /* Bug 15479: spurious "inexact" exception may occur. */ - TEST_f_f (ceil, lit_pi, 4.0, ERRNO_UNCHANGED), - TEST_f_f (ceil, -lit_pi, -3.0, ERRNO_UNCHANGED), - TEST_f_f (ceil, min_subnorm_value, 1.0, ERRNO_UNCHANGED), - TEST_f_f (ceil, min_value, 1.0, ERRNO_UNCHANGED), - TEST_f_f (ceil, 0.1, 1.0, ERRNO_UNCHANGED), - TEST_f_f (ceil, 0.25, 1.0, ERRNO_UNCHANGED), - TEST_f_f (ceil, 0.625, 1.0, ERRNO_UNCHANGED), + TEST_f_f (ceil, lit_pi, 4.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, -lit_pi, -3.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, min_subnorm_value, 1.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, min_value, 1.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, 0.1, 1.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, 0.25, 1.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, 0.625, 1.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), TEST_f_f (ceil, 1, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), TEST_f_f (ceil, 2, 2, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), TEST_f_f (ceil, 0x1p23, 0x1p23, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), @@ -6104,11 +6103,11 @@ static const struct test_f_f_data ceil_test_data[] = TEST_f_f (ceil, 0x1p113, 0x1p113, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), TEST_f_f (ceil, 0x1p114, 0x1p114, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), TEST_f_f (ceil, max_value, max_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), - TEST_f_f (ceil, -min_subnorm_value, minus_zero, ERRNO_UNCHANGED), - TEST_f_f (ceil, -min_value, minus_zero, ERRNO_UNCHANGED), - TEST_f_f (ceil, -0.1, minus_zero, ERRNO_UNCHANGED), - TEST_f_f (ceil, -0.25, minus_zero, ERRNO_UNCHANGED), - TEST_f_f (ceil, -0.625, minus_zero, ERRNO_UNCHANGED), + TEST_f_f (ceil, -min_subnorm_value, minus_zero, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, -min_value, minus_zero, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, -0.1, minus_zero, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, -0.25, minus_zero, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, -0.625, minus_zero, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), TEST_f_f (ceil, -1, -1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), TEST_f_f (ceil, -2, -2, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), TEST_f_f (ceil, -0x1p23, -0x1p23, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), @@ -6130,81 +6129,81 @@ static const struct test_f_f_data ceil_test_data[] = #if MANT_DIG >= 64 /* The result can only be represented in long double. */ - TEST_f_f (ceil, 4503599627370495.5L, 4503599627370496.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, 4503599627370496.25L, 4503599627370497.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, 4503599627370496.5L, 4503599627370497.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, 4503599627370496.75L, 4503599627370497.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, 4503599627370497.5L, 4503599627370498.0L, ERRNO_UNCHANGED), - - TEST_f_f (ceil, -4503599627370495.5L, -4503599627370495.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, -4503599627370496.25L, -4503599627370496.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, -4503599627370496.5L, -4503599627370496.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, -4503599627370496.75L, -4503599627370496.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, -4503599627370497.5L, -4503599627370497.0L, ERRNO_UNCHANGED), + TEST_f_f (ceil, 4503599627370495.5L, 4503599627370496.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, 4503599627370496.25L, 4503599627370497.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, 4503599627370496.5L, 4503599627370497.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, 4503599627370496.75L, 4503599627370497.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, 4503599627370497.5L, 4503599627370498.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + + TEST_f_f (ceil, -4503599627370495.5L, -4503599627370495.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, -4503599627370496.25L, -4503599627370496.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, -4503599627370496.5L, -4503599627370496.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, -4503599627370496.75L, -4503599627370496.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, -4503599627370497.5L, -4503599627370497.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), # if MANT_DIG > 100 - TEST_f_f (ceil, 4503599627370494.5000000000001L, 4503599627370495.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, 4503599627370495.5000000000001L, 4503599627370496.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, 4503599627370496.5000000000001L, 4503599627370497.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, -4503599627370494.5000000000001L, -4503599627370494.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, -4503599627370495.5000000000001L, -4503599627370495.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, -4503599627370496.5000000000001L, -4503599627370496.0L, ERRNO_UNCHANGED), + TEST_f_f (ceil, 4503599627370494.5000000000001L, 4503599627370495.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, 4503599627370495.5000000000001L, 4503599627370496.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, 4503599627370496.5000000000001L, 4503599627370497.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, -4503599627370494.5000000000001L, -4503599627370494.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, -4503599627370495.5000000000001L, -4503599627370495.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, -4503599627370496.5000000000001L, -4503599627370496.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), # endif - TEST_f_f (ceil, 9007199254740991.5L, 9007199254740992.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, 9007199254740992.25L, 9007199254740993.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, 9007199254740992.5L, 9007199254740993.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, 9007199254740992.75L, 9007199254740993.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, 9007199254740993.5L, 9007199254740994.0L, ERRNO_UNCHANGED), + TEST_f_f (ceil, 9007199254740991.5L, 9007199254740992.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, 9007199254740992.25L, 9007199254740993.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, 9007199254740992.5L, 9007199254740993.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, 9007199254740992.75L, 9007199254740993.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, 9007199254740993.5L, 9007199254740994.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), - TEST_f_f (ceil, -9007199254740991.5L, -9007199254740991.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, -9007199254740992.25L, -9007199254740992.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, -9007199254740992.5L, -9007199254740992.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, -9007199254740992.75L, -9007199254740992.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, -9007199254740993.5L, -9007199254740993.0L, ERRNO_UNCHANGED), + TEST_f_f (ceil, -9007199254740991.5L, -9007199254740991.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, -9007199254740992.25L, -9007199254740992.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, -9007199254740992.5L, -9007199254740992.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, -9007199254740992.75L, -9007199254740992.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, -9007199254740993.5L, -9007199254740993.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), # if MANT_DIG > 100 - TEST_f_f (ceil, 9007199254740991.0000000000001L, 9007199254740992.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, 9007199254740992.0000000000001L, 9007199254740993.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, 9007199254740993.0000000000001L, 9007199254740994.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, 9007199254740991.5000000000001L, 9007199254740992.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, 9007199254740992.5000000000001L, 9007199254740993.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, 9007199254740993.5000000000001L, 9007199254740994.0L, ERRNO_UNCHANGED), - - TEST_f_f (ceil, -9007199254740991.0000000000001L, -9007199254740991.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, -9007199254740992.0000000000001L, -9007199254740992.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, -9007199254740993.0000000000001L, -9007199254740993.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, -9007199254740991.5000000000001L, -9007199254740991.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, -9007199254740992.5000000000001L, -9007199254740992.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, -9007199254740993.5000000000001L, -9007199254740993.0L, ERRNO_UNCHANGED), + TEST_f_f (ceil, 9007199254740991.0000000000001L, 9007199254740992.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, 9007199254740992.0000000000001L, 9007199254740993.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, 9007199254740993.0000000000001L, 9007199254740994.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, 9007199254740991.5000000000001L, 9007199254740992.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, 9007199254740992.5000000000001L, 9007199254740993.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, 9007199254740993.5000000000001L, 9007199254740994.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + + TEST_f_f (ceil, -9007199254740991.0000000000001L, -9007199254740991.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, -9007199254740992.0000000000001L, -9007199254740992.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, -9007199254740993.0000000000001L, -9007199254740993.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, -9007199254740991.5000000000001L, -9007199254740991.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, -9007199254740992.5000000000001L, -9007199254740992.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, -9007199254740993.5000000000001L, -9007199254740993.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), # endif - TEST_f_f (ceil, 72057594037927935.5L, 72057594037927936.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, 72057594037927936.25L, 72057594037927937.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, 72057594037927936.5L, 72057594037927937.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, 72057594037927936.75L, 72057594037927937.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, 72057594037927937.5L, 72057594037927938.0L, ERRNO_UNCHANGED), + TEST_f_f (ceil, 72057594037927935.5L, 72057594037927936.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, 72057594037927936.25L, 72057594037927937.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, 72057594037927936.5L, 72057594037927937.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, 72057594037927936.75L, 72057594037927937.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, 72057594037927937.5L, 72057594037927938.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), - TEST_f_f (ceil, -72057594037927935.5L, -72057594037927935.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, -72057594037927936.25L, -72057594037927936.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, -72057594037927936.5L, -72057594037927936.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, -72057594037927936.75L, -72057594037927936.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, -72057594037927937.5L, -72057594037927937.0L, ERRNO_UNCHANGED), + TEST_f_f (ceil, -72057594037927935.5L, -72057594037927935.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, -72057594037927936.25L, -72057594037927936.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, -72057594037927936.5L, -72057594037927936.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, -72057594037927936.75L, -72057594037927936.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, -72057594037927937.5L, -72057594037927937.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), /* Check cases where first double is a exact integer higher than 2^52 and the precision is determined by second long double for IBM long double. */ - TEST_f_f (ceil, 34503599627370498.515625L, 34503599627370499.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, -34503599627370498.515625L, -34503599627370498.0L, ERRNO_UNCHANGED), + TEST_f_f (ceil, 34503599627370498.515625L, 34503599627370499.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, -34503599627370498.515625L, -34503599627370498.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), # if MANT_DIG >= 106 - TEST_f_f (ceil, 1192568192774434123539907640624.484375L, 1192568192774434123539907640625.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, -1192568192774434123539907640624.484375L, -1192568192774434123539907640624.0L, ERRNO_UNCHANGED), + TEST_f_f (ceil, 1192568192774434123539907640624.484375L, 1192568192774434123539907640625.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, -1192568192774434123539907640624.484375L, -1192568192774434123539907640624.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), # endif - TEST_f_f (ceil, 10141204801825835211973625643007.5L, 10141204801825835211973625643008.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, 10141204801825835211973625643008.25L, 10141204801825835211973625643009.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, 10141204801825835211973625643008.5L, 10141204801825835211973625643009.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, 10141204801825835211973625643008.75L, 10141204801825835211973625643009.0L, ERRNO_UNCHANGED), - TEST_f_f (ceil, 10141204801825835211973625643009.5L, 10141204801825835211973625643010.0L, ERRNO_UNCHANGED), + TEST_f_f (ceil, 10141204801825835211973625643007.5L, 10141204801825835211973625643008.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, 10141204801825835211973625643008.25L, 10141204801825835211973625643009.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, 10141204801825835211973625643008.5L, 10141204801825835211973625643009.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, 10141204801825835211973625643008.75L, 10141204801825835211973625643009.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_f_f (ceil, 10141204801825835211973625643009.5L, 10141204801825835211973625643010.0L, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), #endif }; |