[PPL-devel] [GIT] ppl/ppl(floating_point): Fixed various errors.

Fabio Bossi bossi at cs.unipr.it
Fri Sep 4 10:45:30 CEST 2009


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

Author: Fabio Bossi <bossi at cs.unipr.it>
Date:   Fri Sep  4 10:43:37 2009 +0200

Fixed various errors.

---

 ...Division_Floating_Point_Expression.templates.hh |    4 ++--
 src/Floating_Point_Expression.templates.hh         |    2 +-
 ...lication_Floating_Point_Expression.templates.hh |    8 ++++----
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/Division_Floating_Point_Expression.templates.hh b/src/Division_Floating_Point_Expression.templates.hh
index 49be890..5fcfab9 100644
--- a/src/Division_Floating_Point_Expression.templates.hh
+++ b/src/Division_Floating_Point_Expression.templates.hh
@@ -31,8 +31,8 @@ typename Division_Floating_Point_Expression<FP_Interval_Type, FP_Format>
 ::FP_Linear_Form Division_Floating_Point_Expression<FP_Interval_Type,
                                                     FP_Format>
 ::linearize(const FP_Interval_Abstract_Store& store) const {
-  FP_Interval_Type intervalized_second_operand = intervalize(
-                                second_operand->linearize(store));
+  FP_Interval_Type intervalized_second_operand = this->intervalize(
+				second_operand->linearize(store), store);
   // Check if we may divide by zero.
   // FIXME: check the assumption that boundary_type is comparable with zero.
   if (intervalized_second_operand.lower() <= 0 &&
diff --git a/src/Floating_Point_Expression.templates.hh b/src/Floating_Point_Expression.templates.hh
index 9321527..d2b0093 100644
--- a/src/Floating_Point_Expression.templates.hh
+++ b/src/Floating_Point_Expression.templates.hh
@@ -73,7 +73,7 @@ Floating_Point_Expression<FP_Interval_Type, FP_Format>
              next_variable_value = store.find(i);
     if (next_variable_value != store.end()) {
       FP_Interval_Type current_coefficient = lf.coefficient(Variable(i));
-      result += current_coefficient * (*next_variable_value);
+      result += current_coefficient * next_variable_value->second;
     }
   }
 
diff --git a/src/Multiplication_Floating_Point_Expression.templates.hh b/src/Multiplication_Floating_Point_Expression.templates.hh
index fcd8d9b..61d2918 100644
--- a/src/Multiplication_Floating_Point_Expression.templates.hh
+++ b/src/Multiplication_Floating_Point_Expression.templates.hh
@@ -43,11 +43,11 @@ typename Multiplication_Floating_Point_Expression<FP_Interval_Type, FP_Format>
   // true if we intervalize the first form, false if we intervalize the second.
   bool intervalize_first;
   FP_Linear_Form linearized_first_operand = first_operand->linearize(store);
-  FP_Interval_Type intervalized_first_operand = intervalize(
-				                linearized_first_operand);
+  FP_Interval_Type intervalized_first_operand = this->intervalize(
+					     linearized_first_operand, store);
   FP_Linear_Form linearized_second_operand = second_operand->linearize(store);
-  FP_Interval_Type intervalized_second_operand = intervalize(
-                                                 linearized_second_operand);
+  FP_Interval_Type intervalized_second_operand = this->intervalize(
+					      linearized_second_operand, store);
   boundary_type first_interval_size, second_interval_size;
   // FIXME: we are not sure that what we do here is policy-proof.
   if (intervalized_first_operand.is_bounded()) {




More information about the PPL-devel mailing list