[PPL-devel] [GIT] ppl/ppl(master): Avoid unrequested call to mpz_divisible_p.

Abramo Bagnara abramo.bagnara at gmail.com
Sat Mar 28 14:51:49 CET 2009


Module: ppl/ppl
Branch: master
Commit: f162e13b13fe2da4bea4070dd8d0415d66d5a5f6
URL:    http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=f162e13b13fe2da4bea4070dd8d0415d66d5a5f6

Author: Abramo Bagnara <abramo.bagnara at gmail.com>
Date:   Sat Mar 28 14:51:46 2009 +0100

Avoid unrequested call to mpz_divisible_p.

---

 src/checked_mpz.inlines.hh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/checked_mpz.inlines.hh b/src/checked_mpz.inlines.hh
index ec24c92..7e7453c 100644
--- a/src/checked_mpz.inlines.hh
+++ b/src/checked_mpz.inlines.hh
@@ -379,7 +379,7 @@ div_mpz(mpz_class& to, const mpz_class& x, const mpz_class& y,
     return V_LGE;
 #else
     mpz_cdiv_q(to.get_mpz_t(), n, d);
-    return mpz_divisible_p(n, d) ? V_EQ : V_LT;
+    return V_LE;
 #endif
   }
   if (round_down(dir)) {




More information about the PPL-devel mailing list