From 5e2218006061c9225ab6e761dad849b4baab632e Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 24 Apr 2013 20:14:15 +0000 Subject: [PATCH] Add catan, catanh tests at +/- 1 and +/- i. --- ChangeLog | 3 +++ math/libm-test.inc | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/ChangeLog b/ChangeLog index bd97c4cdb1..f3efba4002 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2013-04-24 Joseph Myers + * math/libm-test.inc (catan_test): Add more tests. + (catanh_test): Likewise. + * math/s_catanf.c (__catanf): Use suffixed floating-point constants. * math/s_catanhf.c (__catanhf): Likewise. 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);