summaryrefslogtreecommitdiff
path: root/tests/tmul.c
diff options
context:
space:
mode:
authorenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2009-01-07 16:17:11 +0000
committerenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2009-01-07 16:17:11 +0000
commit397ce8da2cc325b6392e0e9bb10046a7dee30186 (patch)
tree81f8742f2f6510c257db629a47e58c48070c0a33 /tests/tmul.c
parentac52f855461ae54db9e5ab8caedb002a688981ed (diff)
downloadmpc-397ce8da2cc325b6392e0e9bb10046a7dee30186.tar.gz
default precision removed, as well as init and all init_set
combinations git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@408 211d60ee-9f03-0410-a15a-8952a2c7a4e4
Diffstat (limited to 'tests/tmul.c')
-rw-r--r--tests/tmul.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/tests/tmul.c b/tests/tmul.c
index 74fa945..9a6194b 100644
--- a/tests/tmul.c
+++ b/tests/tmul.c
@@ -135,7 +135,7 @@ check_regular (void)
mpfr_set_str (MPC_IM (y), "-0xECp-146", 16, GMP_RNDN);
cmpmul (x, y, MPC_RNDNN);
- for (prec = 2; prec < 1000; prec = prec * 1.1 + 1)
+ for (prec = 2; prec < 1000; prec = prec * 1.1 + 1)
{
mpc_set_prec (x, prec);
mpc_set_prec (y, prec);
@@ -156,17 +156,13 @@ check_regular (void)
static void
check_special (void)
{
- mpc_t x, y, z, t;
+ mpc_t x, y, z;
int inexact;
- mpc_init (x);
- mpc_init (y);
- mpc_init (z);
- mpc_init (t);
+ mpc_init2 (x, 8);
+ mpc_init2 (y, 8);
+ mpc_init2 (z, 8);
- mpc_set_prec (x, 8);
- mpc_set_prec (y, 8);
- mpc_set_prec (z, 8);
mpc_set_si_si (x, 4, 3, MPC_RNDNN);
mpc_set_si_si (y, 1, -2, MPC_RNDNN);
inexact = mpc_mul (z, x, y, MPC_RNDNN);
@@ -186,6 +182,7 @@ check_special (void)
mpc_clear (x);
mpc_clear (y);
+ mpc_clear (z);
}
#ifdef TIMING