diff options
author | zimmerma <zimmerma@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2011-02-09 08:36:18 +0000 |
---|---|---|
committer | zimmerma <zimmerma@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2011-02-09 08:36:18 +0000 |
commit | 9a14cee2f71262da8167554aca5604d4421b9e50 (patch) | |
tree | 660314299b7dee9e12b738ac1f967832e9fe558f /tests/ttan.c | |
parent | 20a3cf10d4881b50f19d177beb2ff57dd2a6a394 (diff) | |
download | mpc-9a14cee2f71262da8167554aca5604d4421b9e50.tar.gz |
done two "code clean-up" items during a Nancy-Paris train trip...
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@912 211d60ee-9f03-0410-a15a-8952a2c7a4e4
Diffstat (limited to 'tests/ttan.c')
-rw-r--r-- | tests/ttan.c | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/tests/ttan.c b/tests/ttan.c index 1d9bea9..175471d 100644 --- a/tests/ttan.c +++ b/tests/ttan.c @@ -23,17 +23,6 @@ MA 02111-1307, USA. */ #include "mpc-tests.h" static void -test_failed (mpc_t op, mpc_t get, mpc_t expected) -{ - printf ("mpc_tan(op) failed\n with "); - MPC_OUT (op); - printf (" "); - MPC_OUT (get); - MPC_OUT (expected); - exit (1); -} - -static void pure_real_argument (void) { /* tan(x -i*0) = tan(x) -i*0 */ @@ -152,7 +141,7 @@ pure_imaginary_argument (void) mpfr_set_ui (MPC_RE (c99), 0, GMP_RNDN); mpfr_set (MPC_IM (c99), tanh_y, GMP_RNDN); - test_failed (z, tan_z, c99); + TEST_FAILED ("mpc_tan", z, tan_z, c99, MPC_RNDNN); } /* tan(0 -i) = +0 +i*tanh(-1) */ @@ -168,7 +157,7 @@ pure_imaginary_argument (void) mpfr_set_ui (MPC_RE (c99), 0, GMP_RNDN); mpfr_set (MPC_IM (c99), tanh_y, GMP_RNDN); - test_failed (z, tan_z, c99); + TEST_FAILED ("mpc_tan", z, tan_z, c99, MPC_RNDNN); } /* tan(-0 +i) = -0 +i*tanh(1) */ @@ -184,7 +173,7 @@ pure_imaginary_argument (void) mpfr_set_ui (MPC_RE (c99), 0, GMP_RNDN); mpfr_set (MPC_IM (c99), tanh_y, GMP_RNDN); - test_failed (z, tan_z, c99); + TEST_FAILED ("mpc_tan", z, tan_z, c99, MPC_RNDNN); } /* tan(-0 -i) = -0 +i*tanh(-1) */ @@ -200,7 +189,7 @@ pure_imaginary_argument (void) mpfr_set_ui (MPC_RE (c99), 0, GMP_RNDN); mpfr_set (MPC_IM (c99), tanh_y, GMP_RNDN); - test_failed (z, tan_z, c99); + TEST_FAILED ("mpc_tan", z, tan_z, c99, MPC_RNDNN); } mpc_clear (tan_z); @@ -229,17 +218,17 @@ check_53 (void) mpfr_set_str (MPC_IM (t), "1D02967C31CDB5", 16, GMP_RNDN); mpc_tan (tan_z, z, MPC_RNDNN); if (mpc_cmp (tan_z, t) != 0) - test_failed (z, tan_z, t); + TEST_FAILED ("mpc_tan", z, tan_z, t, MPC_RNDNN); mpfr_set_str (MPC_RE (t), "1D02967C31CDB4", 16, GMP_RNDN); mpc_tan (tan_z, z, MPC_RNDDU); if (mpc_cmp (tan_z, t) != 0) - test_failed (z, tan_z, t); + TEST_FAILED ("mpc_tan", z, tan_z, t, MPC_RNDDU); mpfr_set_str (MPC_IM (t), "1D02967C31CDB4", 16, GMP_RNDN); mpc_tan (tan_z, z, MPC_RNDZD); if (mpc_cmp (tan_z, t) != 0) - test_failed (z, tan_z, t); + TEST_FAILED ("mpc_tan", z, tan_z, t, MPC_RNDZD); /* Re(z) = x + 2^(-52) */ /* Im(z) = y - 2^(-52) */ @@ -249,7 +238,7 @@ check_53 (void) mpfr_set_str (MPC_IM (t), "-B0BD0AA4A3B3D", 16, GMP_RNDN); mpc_tan (tan_z, z, MPC_RNDNN); if (mpc_cmp (tan_z, t) != 0) - test_failed (z, tan_z, t); + TEST_FAILED ("mpc_tan", z, tan_z, t, MPC_RNDNN); mpc_clear (t); mpc_clear (tan_z); |