[PPL-devel] [GIT] ppl/ppl(ppl-0_11-branch): Do not use the deprecated function mpz_div_2exp.

Roberto Bagnara bagnara at cs.unipr.it
Thu Feb 3 07:53:07 CET 2011


Module: ppl/ppl
Branch: ppl-0_11-branch
Commit: d4220bc1c8e9cc00d2e3ef3e4e675a0dc7fff51a
URL:    http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=d4220bc1c8e9cc00d2e3ef3e4e675a0dc7fff51a

Author: Roberto Bagnara <bagnara at cs.unipr.it>
Date:   Thu Feb  3 07:51:31 2011 +0100

Do not use the deprecated function mpz_div_2exp.
Use mpz_tdiv_q_2exp instead.

---

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

diff --git a/src/checked_float.inlines.hh b/src/checked_float.inlines.hh
index 8f1fa76..f6077c1 100644
--- a/src/checked_float.inlines.hh
+++ b/src/checked_float.inlines.hh
@@ -887,7 +887,7 @@ assign_float_mpq(T& to, const mpq_class& from, Rounding_Dir dir)
   mpz_clear(r);
   if (bits == needed_bits + 1) {
     inexact = (inexact || mpz_odd_p(mantissa));
-    mpz_div_2exp(mantissa, mantissa, 1);
+    mpz_tdiv_q_2exp(mantissa, mantissa, 1);
   }
   else
     --exponent;




More information about the PPL-devel mailing list