[mpfi] 21/39: Apply patch by Philippe Theveny to fix tis_zero.

Jerome Benoit calculus-guest at moszumanska.debian.org
Sat May 23 02:12:12 UTC 2015


This is an automated email from the git hooks/post-receive script.

calculus-guest pushed a commit to branch master
in repository mpfi.

commit 0d007be25997e9e12a35aad1c62f10d7fd4f4cda
Author: Laurent Fousse <laurent at komite.net>
Date:   Fri Aug 13 16:11:01 2010 +0200

    Apply patch by Philippe Theveny to fix tis_zero.
---
 tests/tis_zero.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/tests/tis_zero.c b/tests/tis_zero.c
index 4937dd4..ebeffe1 100644
--- a/tests/tis_zero.c
+++ b/tests/tis_zero.c
@@ -60,13 +60,16 @@ main (int argc, char **argv)
     mpfr_set_prec (x, p);
     mpfi_set_prec (interval, p);
 
-    random_mpfr (x); /* x != 0*/
+    random_mpfr (x);
     mpfi_set_fr (interval, x);
-    if (mpfi_is_zero (interval)) {
+    if (mpfi_is_zero (interval) && !mpfr_zero_p (x)) {
       print_error (interval);
     }
 
     random_mpfr (x);
+    if (mpfr_zero_p (x))
+      mpfr_nextabove (x);
+    /* x != 0*/
     mpfi_put_fr (interval, x);
     if (mpfi_is_zero (interval)) {
       print_error (interval);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mpfi.git



More information about the debian-science-commits mailing list