diff options
author | Joseph Myers <joseph@codesourcery.com> | 2013-08-21 19:56:48 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2013-08-21 19:56:48 +0000 |
commit | acd06bb11f6d6436e15d0c7608fc7ea6008c224f (patch) | |
tree | c789341c0b86f19efa34ba8dbb09bef9705c2817 /math/libm-test.inc | |
parent | c0c3f78afb6070721848574e2e5dff5cfa20e28d (diff) | |
download | glibc-acd06bb11f6d6436e15d0c7608fc7ea6008c224f.tar.gz glibc-acd06bb11f6d6436e15d0c7608fc7ea6008c224f.tar.xz glibc-acd06bb11f6d6436e15d0c7608fc7ea6008c224f.zip |
Fix fdim handling of infinities (bug 15797).
Diffstat (limited to 'math/libm-test.inc')
-rw-r--r-- | math/libm-test.inc | 58 |
1 files changed, 31 insertions, 27 deletions
diff --git a/math/libm-test.inc b/math/libm-test.inc index 25ea33603c..43c4a8fd9c 100644 --- a/math/libm-test.inc +++ b/math/libm-test.inc @@ -8144,33 +8144,37 @@ fabs_test (void) static const struct test_ff_f_data fdim_test_data[] = { - TEST_ff_f (fdim, 0, 0, 0, NO_INEXACT_EXCEPTION), - TEST_ff_f (fdim, 9, 0, 9, NO_INEXACT_EXCEPTION), - TEST_ff_f (fdim, 0, 9, 0, NO_INEXACT_EXCEPTION), - TEST_ff_f (fdim, -9, 0, 0, NO_INEXACT_EXCEPTION), - TEST_ff_f (fdim, 0, -9, 9, NO_INEXACT_EXCEPTION), - - TEST_ff_f (fdim, plus_infty, 9, plus_infty, NO_INEXACT_EXCEPTION), - TEST_ff_f (fdim, plus_infty, -9, plus_infty, NO_INEXACT_EXCEPTION), - TEST_ff_f (fdim, minus_infty, 9, 0, NO_INEXACT_EXCEPTION), - TEST_ff_f (fdim, minus_infty, -9, 0, NO_INEXACT_EXCEPTION), - TEST_ff_f (fdim, 9, minus_infty, plus_infty, NO_INEXACT_EXCEPTION), - TEST_ff_f (fdim, -9, minus_infty, plus_infty, NO_INEXACT_EXCEPTION), - TEST_ff_f (fdim, 9, plus_infty, 0, NO_INEXACT_EXCEPTION), - TEST_ff_f (fdim, -9, plus_infty, 0, NO_INEXACT_EXCEPTION), - - TEST_ff_f (fdim, 0, qnan_value, qnan_value, NO_INEXACT_EXCEPTION), - TEST_ff_f (fdim, 9, qnan_value, qnan_value, NO_INEXACT_EXCEPTION), - TEST_ff_f (fdim, -9, qnan_value, qnan_value, NO_INEXACT_EXCEPTION), - TEST_ff_f (fdim, qnan_value, 9, qnan_value, NO_INEXACT_EXCEPTION), - TEST_ff_f (fdim, qnan_value, -9, qnan_value, NO_INEXACT_EXCEPTION), - TEST_ff_f (fdim, plus_infty, qnan_value, qnan_value, NO_INEXACT_EXCEPTION), - TEST_ff_f (fdim, minus_infty, qnan_value, qnan_value, NO_INEXACT_EXCEPTION), - TEST_ff_f (fdim, qnan_value, plus_infty, qnan_value, NO_INEXACT_EXCEPTION), - TEST_ff_f (fdim, qnan_value, minus_infty, qnan_value, NO_INEXACT_EXCEPTION), - TEST_ff_f (fdim, qnan_value, qnan_value, qnan_value, NO_INEXACT_EXCEPTION), - - TEST_ff_f (fdim, plus_infty, plus_infty, 0, NO_INEXACT_EXCEPTION), + TEST_ff_f (fdim, 0, 0, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_ff_f (fdim, 9, 0, 9, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_ff_f (fdim, 0, 9, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_ff_f (fdim, -9, 0, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_ff_f (fdim, 0, -9, 9, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + + TEST_ff_f (fdim, plus_infty, 9, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_ff_f (fdim, plus_infty, -9, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_ff_f (fdim, minus_infty, 9, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_ff_f (fdim, minus_infty, -9, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_ff_f (fdim, 9, minus_infty, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_ff_f (fdim, -9, minus_infty, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_ff_f (fdim, 9, plus_infty, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_ff_f (fdim, -9, plus_infty, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + + TEST_ff_f (fdim, 0, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_ff_f (fdim, 9, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_ff_f (fdim, -9, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_ff_f (fdim, qnan_value, 0, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_ff_f (fdim, qnan_value, 9, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_ff_f (fdim, qnan_value, -9, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_ff_f (fdim, plus_infty, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_ff_f (fdim, minus_infty, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_ff_f (fdim, qnan_value, plus_infty, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_ff_f (fdim, qnan_value, minus_infty, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_ff_f (fdim, qnan_value, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + + TEST_ff_f (fdim, plus_infty, plus_infty, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_ff_f (fdim, plus_infty, minus_infty, plus_infty, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_ff_f (fdim, minus_infty, plus_infty, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), + TEST_ff_f (fdim, minus_infty, minus_infty, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), }; static void |