summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2011-09-01 19:12:47 +0000
committerenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2011-09-01 19:12:47 +0000
commit987bd110621cf470086809e14ced2d13ed14a9d0 (patch)
tree9298ea881a17d87d335c37298386fbb43d361349
parentc99f17f4fb8f05d49ab428cea31faae3aead882d (diff)
downloadmpc-987bd110621cf470086809e14ced2d13ed14a9d0.tar.gz
ttan.c, tan.dat: moved fixed test values to data file
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@1065 211d60ee-9f03-0410-a15a-8952a2c7a4e4
-rw-r--r--TODO3
-rw-r--r--tests/tan.dat8
-rw-r--r--tests/ttan.c48
3 files changed, 7 insertions, 52 deletions
diff --git a/TODO b/TODO
index eb6ac0f..2ef75c1 100644
--- a/TODO
+++ b/TODO
@@ -4,9 +4,6 @@ instead of two at precision 2*p and one at precision p
requires analysis of error propagation
From Andreas Enge 30 August 2011:
-move static tests from tpow_z, ttan, tui_div to data files
-
-From Andreas Enge 30 August 2011:
As soon as dependent on mpfr>=3, remove auxiliary functions from
get_version.c and update mpc.h.
diff --git a/tests/tan.dat b/tests/tan.dat
index 9667edd..d9ce811 100644
--- a/tests/tan.dat
+++ b/tests/tan.dat
@@ -1,6 +1,6 @@
# Data test file for mpc_tan.
#
-# Copyright (C) 2008, 2010 INRIA
+# Copyright (C) 2008, 2010, 2011 INRIA
#
# This file is part of GNU MPC.
#
@@ -126,3 +126,9 @@
# huge values
+ - 53 -0 53 -1 53 0x4580CBF242683p-3 53 -0x1B3E8A3660D279p-3 N N
+ + 53 -0 53 +1 53 -0x1B3E8A3660D279p-3 53 0x4580CBF242683p-3 N N
+
+# some values taken from ttan.c
++ + 53 0x1D02967C31CDB5 53 0x1D02967C31CDB5 53 0x3243F6A8885A30p-53 53 0x11A62633145C07p-106 N N
+- + 53 0x1D02967C31CDB4 53 0x1D02967C31CDB5 53 0x3243F6A8885A30p-53 53 0x11A62633145C07p-106 D U
+- - 53 0x1D02967C31CDB4 53 0x1D02967C31CDB4 53 0x3243F6A8885A30p-53 53 0x11A62633145C07p-106 Z D
+- + 53 -0xB0BD0AA4A3B3D 53 -0xB0BD0AA4A3B3D 53 0x1921FB54442D19p-52 53 -0x172CECE675D1FDp-105 N N
diff --git a/tests/ttan.c b/tests/ttan.c
index e2e2c8a..53d6264 100644
--- a/tests/ttan.c
+++ b/tests/ttan.c
@@ -197,53 +197,6 @@ pure_imaginary_argument (void)
mpfr_clear (y);
}
-static void
-check_53 (void)
-{
- mpc_t z;
- mpc_t tan_z;
- mpc_t t;
-
- mpc_init2 (z, 53);
- mpc_init2 (tan_z, 53);
- mpc_init2 (t, 53);
-
- /* Let's play around the poles */
- /* x = Re(z) = Pi/2 rounded to nearest to 53 bits precision */
- /* y = Im(z) = Pi/2 - Re(z) rounded to nearest to 53 bits precision */
- mpfr_set_str (MPC_RE (z), "3243F6A8885A30p-53", 16, GMP_RNDN);
- mpfr_set_str (MPC_IM (z), "11A62633145C07p-106", 16, GMP_RNDN);
- mpfr_set_str (MPC_RE (t), "1D02967C31CDB5", 16, GMP_RNDN);
- 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 ("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 ("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 ("mpc_tan", z, tan_z, t, MPC_RNDZD);
-
- /* Re(z) = x + 2^(-52) */
- /* Im(z) = y - 2^(-52) */
- mpfr_set_str (MPC_RE (z), "1921FB54442D19p-52", 16, GMP_RNDN);
- mpfr_set_str (MPC_IM (z), "-172CECE675D1FDp-105", 16, GMP_RNDN);
- mpfr_set_str (MPC_RE (t), "-B0BD0AA4A3B3D", 16, GMP_RNDN);
- 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 ("mpc_tan", z, tan_z, t, MPC_RNDNN);
-
- mpc_clear (t);
- mpc_clear (tan_z);
- mpc_clear (z);
-}
-
int
main (void)
{
@@ -256,7 +209,6 @@ main (void)
pure_real_argument ();
pure_imaginary_argument ();
- check_53 ();
test_end ();