summaryrefslogtreecommitdiff
path: root/tests/tui_pow.c
diff options
context:
space:
mode:
authorpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2005-06-06 14:49:55 +0000
committerpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2005-06-06 14:49:55 +0000
commitaa95f5702bef80195bbb3b103a430bf9379bf30a (patch)
treed8a692f862b57fa30ffe2668dd82756e69bf141e /tests/tui_pow.c
parentdb5c0c2631a3d07b367ebb6fc512bc51f2442661 (diff)
downloadmpfr-aa95f5702bef80195bbb3b103a430bf9379bf30a.tar.gz
Improve coverage
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3618 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tui_pow.c')
-rw-r--r--tests/tui_pow.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/tui_pow.c b/tests/tui_pow.c
index 74d3c3d4e..9904fe359 100644
--- a/tests/tui_pow.c
+++ b/tests/tui_pow.c
@@ -55,6 +55,8 @@ test1 (void)
/* Check for ui_pow_ui */
mpfr_ui_pow_ui (x, 0, 1, GMP_RNDN);
MPFR_ASSERTN(mpfr_cmp_ui (x, 0) == 0 && MPFR_IS_POS (x));
+ mpfr_ui_pow_ui (x, 0, 4, GMP_RNDN);
+ MPFR_ASSERTN(mpfr_cmp_ui (x, 0) == 0 && MPFR_IS_POS (x));
res1 = mpfr_ui_pow_ui (z, 17, 42, GMP_RNDD);
mpfr_set_ui (x, 17, GMP_RNDN);
mpfr_set_ui (y, 42, GMP_RNDN);
@@ -65,8 +67,16 @@ test1 (void)
"Inexact1 = %d Inexact2 = %d\n", res1, res2);
mpfr_dump (z);
mpfr_dump (a);
+ exit (1);
+ }
+ mpfr_set_prec (x, 2);
+ mpfr_ui_pow_ui (x, 65537, 65535, GMP_RNDN);
+ if (mpfr_cmp_str (x, "0.11E1048562", 2, GMP_RNDN) != 0)
+ {
+ printf ("Error for ui_pow_ui for 65537 ^65535 with 2 bits of precision\n");
+ mpfr_dump (x);
+ exit (1);
}
-
mpfr_clear (x);
mpfr_clear (y);
mpfr_clear (z);