diff options
author | Ulrich Drepper <drepper@redhat.com> | 2009-04-26 05:42:49 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2009-04-26 05:42:49 +0000 |
commit | 337c270829f7088949ba0c96fffa6326fde17f78 (patch) | |
tree | 156108c0cf719838f421f4b30116ad8f3181056f /math | |
parent | 002a604fd61d1d3b8d82a5a85959ba4ebd210aec (diff) | |
download | glibc-337c270829f7088949ba0c96fffa6326fde17f78.zip glibc-337c270829f7088949ba0c96fffa6326fde17f78.tar.gz glibc-337c270829f7088949ba0c96fffa6326fde17f78.tar.bz2 |
* sysdeps/i386/fpu/s_tan.S: Set errno for ±Inf.
* sysdeps/i386/fpu/s_tanf.S: Likewise.
* sysdeps/i386/fpu/s_tanl.S: Likewise.
* sysdeps/ieee754/dbl-64/s_tan.c: Likewise.
* sysdeps/ieee754/flt-32/s_tanf.c: Likewise.
* sysdeps/x86_64/fpu/s_tanl.S: Likewise.
* math/libm-test.inc: Add tests for errno after tan calls with
±Inf.
Diffstat (limited to 'math')
-rw-r--r-- | math/libm-test.inc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/math/libm-test.inc b/math/libm-test.inc index 19025ec..8c5727c 100644 --- a/math/libm-test.inc +++ b/math/libm-test.inc @@ -5653,9 +5653,15 @@ tan_test (void) TEST_f_f (tan, 0, 0); TEST_f_f (tan, minus_zero, minus_zero); + errno = 0; TEST_f_f (tan, plus_infty, nan_value, INVALID_EXCEPTION); + check_int ("errno for tan(Inf) == EDOM", errno, EDOM, 0, 0, 0); + errno = 0; TEST_f_f (tan, minus_infty, nan_value, INVALID_EXCEPTION); + check_int ("errno for tan(-Inf) == EDOM", errno, EDOM, 0, 0, 0); + errno = 0; TEST_f_f (tan, nan_value, nan_value); + check_int ("errno for tan(NaN) == 0", errno, 0, 0, 0, 0); TEST_f_f (tan, M_PI_4l, 1); TEST_f_f (tan, 0.75L, 0.931596459944072461165202756573936428L); |