summaryrefslogtreecommitdiff
path: root/tests/tmul_ui.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2001-11-30 13:37:37 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2001-11-30 13:37:37 +0000
commit538b931a3b879b73798dcbe4fd9a979a95174cd4 (patch)
tree713fa59db50eadb7a0886a390baaebda16331f8a /tests/tmul_ui.c
parent2a906d4c9bbb339a55823e51fa92e2e78fdbb917 (diff)
downloadmpfr-538b931a3b879b73798dcbe4fd9a979a95174cd4.tar.gz
start tests with precision 2 instead of 1
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1606 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tmul_ui.c')
-rw-r--r--tests/tmul_ui.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/tmul_ui.c b/tests/tmul_ui.c
index 0512513f5..e307d5a5b 100644
--- a/tests/tmul_ui.c
+++ b/tests/tmul_ui.c
@@ -47,7 +47,8 @@ check_inexact (mp_prec_t p)
fprintf (stderr, "Error: result should be exact\n");
exit (1);
}
- for (q=1; q<=p; q++)
+
+ for (q=2; q<=p; q++)
for (rnd=0; rnd<4; rnd++)
{
mpfr_set_prec (y, q);
@@ -63,11 +64,11 @@ check_inexact (mp_prec_t p)
}
}
- mpfr_set_prec (x, 1);
- mpfr_set_ui (x, 2, GMP_RNDN);
- if (mpfr_mul_ui (x, x, 3, GMP_RNDZ) == 0)
+ mpfr_set_prec (x, 2);
+ mpfr_set_ui (x, 1, GMP_RNDN);
+ if (mpfr_mul_ui (x, x, 5, GMP_RNDZ) == 0)
{
- fprintf (stderr, "mul_ui(2, 3) cannot be exact with prec=1\n");
+ fprintf (stderr, "mul_ui(1, 5) cannot be exact with prec=2\n");
exit (1);
}
@@ -83,7 +84,7 @@ main (int argc, char *argv[])
unsigned int xprec, yprec, i;
mp_prec_t p;
- for (p=1; p<100; p++)
+ for (p=2; p<100; p++)
for (i=1; i<50; i++)
check_inexact (p);