summaryrefslogtreecommitdiff
path: root/tests/tget_z.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2009-04-01 13:26:42 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2009-04-01 13:26:42 +0000
commitebbab3ee45dd22a83422ed84eadbdc5da303872a (patch)
tree794c28ac7c1e190f50dc25fad9ad2139223e6e71 /tests/tget_z.c
parent2f80055c4418d47578b924debeffb6c6a8682159 (diff)
downloadmpfr-ebbab3ee45dd22a83422ed84eadbdc5da303872a.tar.gz
[get_z.c] simplified the code, removed the FIXME
[tget_z.c] added new test git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@6147 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tget_z.c')
-rw-r--r--tests/tget_z.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/tget_z.c b/tests/tget_z.c
index 9f9fd3cb7..d7f8b4cf5 100644
--- a/tests/tget_z.c
+++ b/tests/tget_z.c
@@ -43,6 +43,15 @@ check_diff (void)
exit (1);
}
+ mpfr_set_prec (x, 6);
+ mpfr_set_str (x, "17.5", 10, MPFR_RNDN);
+ mpfr_get_z (z, x, MPFR_RNDN);
+ if (mpz_cmp_ui (z, 18) != 0)
+ {
+ printf ("get_z RN 17.5 failed\n");
+ exit (1);
+ }
+
/* save default emin */
emin = mpfr_get_emin ();;