[PPL-devel] [GIT] ppl/ppl(master): Use std::floor() and std::frexp() instead of floorl( ) and frexpl(), respectively.

Roberto Bagnara bagnara at cs.unipr.it
Fri Jun 29 14:37:33 CEST 2012


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

Author: Roberto Bagnara <bagnara at cs.unipr.it>
Date:   Fri Jun 29 14:36:58 2012 +0200

Use std::floor() and std::frexp() instead of floorl() and frexpl(), respectively.

---

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

diff --git a/src/checked_float.inlines.hh b/src/checked_float.inlines.hh
index 42fd370..254e8c4 100644
--- a/src/checked_float.inlines.hh
+++ b/src/checked_float.inlines.hh
@@ -25,9 +25,7 @@ site: http://bugseng.com/products/ppl/ . */
 #define PPL_checked_float_inlines_hh 1
 
 #include "compiler.hh"
-#ifndef __alpha
 #include <cmath>
-#endif
 
 namespace Parma_Polyhedra_Library {
 
@@ -1009,7 +1007,7 @@ assign_mpq_numeric_float(mpq_class& to, const long double from) {
   mpz_class& num = to.get_num();
   mpz_class& den = to.get_den();
   int exp;
-  long double n = frexpl(from, &exp);
+  long double n = std::frexp(from, &exp);
   bool neg = false;
   if (n < 0) {
     neg = true;
@@ -1020,7 +1018,7 @@ assign_mpq_numeric_float(mpq_class& to, const long double from) {
   while (true) {
     n *= mult;
     exp -= bits;
-    long double intpart = floorl(n);
+    long double intpart = std::floor(n);
     num += (unsigned long)intpart;
     n -= intpart;
     if (n == 0)




More information about the PPL-devel mailing list