aboutsummaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2013-04-24 20:14:15 +0000
committerJoseph Myers <joseph@codesourcery.com>2013-04-24 20:14:15 +0000
commit5e2218006061c9225ab6e761dad849b4baab632e (patch)
treef2d6e0ca010ac6dd4aa2e7f37ca48fe4ead19b14 /math
parent77f143fdb4770278f90e8f64d673b7e84d84a99f (diff)
downloadglibc-5e2218006061c9225ab6e761dad849b4baab632e.tar
glibc-5e2218006061c9225ab6e761dad849b4baab632e.tar.gz
glibc-5e2218006061c9225ab6e761dad849b4baab632e.tar.bz2
glibc-5e2218006061c9225ab6e761dad849b4baab632e.zip
Add catan, catanh tests at +/- 1 and +/- i.
Diffstat (limited to 'math')
-rw-r--r--math/libm-test.inc18
1 files changed, 18 insertions, 0 deletions
diff --git a/math/libm-test.inc b/math/libm-test.inc
index 447b6037ae..00edede316 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -4254,6 +4254,15 @@ catan_test (void)
TEST_c_c (catan, 0, minus_zero, 0, minus_zero);
TEST_c_c (catan, minus_zero, minus_zero, minus_zero, minus_zero);
+ TEST_c_c (catan, 1.0L, plus_zero, M_PI_4l, plus_zero);
+ TEST_c_c (catan, 1.0L, minus_zero, M_PI_4l, minus_zero);
+ TEST_c_c (catan, -1.0L, plus_zero, -M_PI_4l, plus_zero);
+ TEST_c_c (catan, -1.0L, minus_zero, -M_PI_4l, minus_zero);
+ TEST_c_c (catan, plus_zero, 1.0L, plus_zero, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+ TEST_c_c (catan, minus_zero, 1.0L, minus_zero, plus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+ TEST_c_c (catan, plus_zero, -1.0L, plus_zero, minus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+ TEST_c_c (catan, minus_zero, -1.0L, minus_zero, minus_infty, DIVIDE_BY_ZERO_EXCEPTION);
+
TEST_c_c (catan, plus_infty, plus_infty, M_PI_2l, 0);
TEST_c_c (catan, plus_infty, minus_infty, M_PI_2l, minus_zero);
TEST_c_c (catan, minus_infty, plus_infty, -M_PI_2l, 0);
@@ -4350,6 +4359,15 @@ catanh_test (void)
TEST_c_c (catanh, 0, minus_zero, 0.0, minus_zero);
TEST_c_c (catanh, minus_zero, minus_zero, minus_zero, minus_zero);
+ TEST_c_c (catanh, 1.0L, plus_zero, plus_infty, plus_zero, DIVIDE_BY_ZERO_EXCEPTION);
+ TEST_c_c (catanh, 1.0L, minus_zero, plus_infty, minus_zero, DIVIDE_BY_ZERO_EXCEPTION);
+ TEST_c_c (catanh, -1.0L, plus_zero, minus_infty, plus_zero, DIVIDE_BY_ZERO_EXCEPTION);
+ TEST_c_c (catanh, -1.0L, minus_zero, minus_infty, minus_zero, DIVIDE_BY_ZERO_EXCEPTION);
+ TEST_c_c (catanh, plus_zero, 1.0L, plus_zero, M_PI_4l);
+ TEST_c_c (catanh, minus_zero, 1.0L, minus_zero, M_PI_4l);
+ TEST_c_c (catanh, plus_zero, -1.0L, plus_zero, -M_PI_4l);
+ TEST_c_c (catanh, minus_zero, -1.0L, minus_zero, -M_PI_4l);
+
TEST_c_c (catanh, plus_infty, plus_infty, 0.0, M_PI_2l);
TEST_c_c (catanh, plus_infty, minus_infty, 0.0, -M_PI_2l);
TEST_c_c (catanh, minus_infty, plus_infty, minus_zero, M_PI_2l);