[PPL-devel] [GIT] ppl/ppl(master): Literals fixed.

Roberto Bagnara bagnara at cs.unipr.it
Wed Aug 15 15:57:23 CEST 2012


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

Author: Roberto Bagnara <bagnara at cs.unipr.it>
Date:   Wed Aug 15 15:56:13 2012 +0200

Literals fixed.

---

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

diff --git a/src/checked_float.inlines.hh b/src/checked_float.inlines.hh
index 44ab5ee..30c9088 100644
--- a/src/checked_float.inlines.hh
+++ b/src/checked_float.inlines.hh
@@ -1002,7 +1002,7 @@ template <>
 inline void
 assign_mpq_numeric_float(mpq_class& to, const long double from) {
   to = 0;
-  if (from == 0)
+  if (from == 0.0L)
     return;
   mpz_class& num = to.get_num();
   mpz_class& den = to.get_den();
@@ -1021,7 +1021,7 @@ assign_mpq_numeric_float(mpq_class& to, const long double from) {
     long double intpart = std::floor(n);
     num += static_cast<unsigned long>(intpart);
     n -= intpart;
-    if (n == 0)
+    if (n == 0.0L)
       break;
     num <<= bits;
   }




More information about the PPL-devel mailing list