summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2008-07-25 11:53:55 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2008-07-25 11:53:55 +0000
commit4b979c5f2441767527831814458d0eece80f5b3d (patch)
tree98e3b84ae9e72dbf576669d92985e7e948b1d29c
parent7e967704ea7a305f95b3bc3382ce7d478d452eba (diff)
downloadmpfr-4b979c5f2441767527831814458d0eece80f5b3d.tar.gz
tests/tpow_all.c: added test of mpfr_exp2 and mpfr_exp10.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/vlefevre@5446 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r--tests/tpow_all.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/tpow_all.c b/tests/tpow_all.c
index d5cc4bd30..87a88ad2d 100644
--- a/tests/tpow_all.c
+++ b/tests/tpow_all.c
@@ -202,6 +202,32 @@ test_others (const void *sx, const char *sy, mp_rnd_t rnd,
inex2 = mpfr_ui_pow (z2, xx, y, rnd);
cmpres (spx, sx, sy, rnd, z1, inex1, z2, inex2,
"mpfr_ui_pow, flags set");
+
+ /* If x = 2, we can test mpfr_exp2. */
+ if (xx == 2)
+ {
+ mpfr_clear_flags ();
+ inex2 = mpfr_exp2 (z2, y, rnd);
+ cmpres (spx, sx, sy, rnd, z1, inex1, z2, inex2,
+ "mpfr_exp2, flags cleared");
+ __gmpfr_flags = MPFR_FLAGS_ALL;
+ inex2 = mpfr_exp2 (z2, y, rnd);
+ cmpres (spx, sx, sy, rnd, z1, inex1, z2, inex2,
+ "mpfr_exp2, flags set");
+ }
+
+ /* If x = 10, we can test mpfr_exp10. */
+ if (xx == 10)
+ {
+ mpfr_clear_flags ();
+ inex2 = mpfr_exp10 (z2, y, rnd);
+ cmpres (spx, sx, sy, rnd, z1, inex1, z2, inex2,
+ "mpfr_exp10, flags cleared");
+ __gmpfr_flags = MPFR_FLAGS_ALL;
+ inex2 = mpfr_exp10 (z2, y, rnd);
+ cmpres (spx, sx, sy, rnd, z1, inex1, z2, inex2,
+ "mpfr_exp10, flags set");
+ }
}
mpfr_clear (z2);