[GIT] ppl/ppl(floating_point): Style improvements.

Module: ppl/ppl Branch: floating_point Commit: d152f786262208e5c66f886cc969641f3b602ef4 URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=d152f78626220...
Author: Fabio Bossi bossi@cs.unipr.it Date: Fri Sep 4 09:40:19 2009 +0200
Style improvements.
---
...fference_Floating_Point_Expression.templates.hh | 2 +- ...Division_Floating_Point_Expression.templates.hh | 2 +- src/Floating_Point_Expression.templates.hh | 6 +++--- ...lication_Floating_Point_Expression.templates.hh | 4 ++-- src/Sum_Floating_Point_Expression.templates.hh | 2 +- src/Variable_Floating_Point_Expression.inlines.hh | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/Difference_Floating_Point_Expression.templates.hh b/src/Difference_Floating_Point_Expression.templates.hh index 6892ee7..4d7588c 100644 --- a/src/Difference_Floating_Point_Expression.templates.hh +++ b/src/Difference_Floating_Point_Expression.templates.hh @@ -33,7 +33,7 @@ typename Difference_Floating_Point_Expression<FP_Interval_Type, FP_Format> ::linearize(const FP_Interval_Abstract_Store& store) const { FP_Linear_Form linearized_first_operand = first_operand->linearize(store); FP_Linear_Form linearized_second_operand = second_operand->linearize(store); - FP_Interval_Type abs_error = FP_Interval_Type(-this->absolute_error); + FP_Interval_Type abs_error(-this->absolute_error); // FIXME: this may be incorrect for some policies. abs_error.join_assign(this->absolute_error); FP_Linear_Form result = linearized_first_operand - linearized_second_operand + diff --git a/src/Division_Floating_Point_Expression.templates.hh b/src/Division_Floating_Point_Expression.templates.hh index 8d35a79..49be890 100644 --- a/src/Division_Floating_Point_Expression.templates.hh +++ b/src/Division_Floating_Point_Expression.templates.hh @@ -40,7 +40,7 @@ typename Division_Floating_Point_Expression<FP_Interval_Type, FP_Format> throw Linearization_Failed();
FP_Linear_Form linearized_first_operand = first_operand->linearize(store); - FP_Interval_Type abs_error = FP_Interval_Type(-this->absolute_error); + FP_Interval_Type abs_error(-this->absolute_error); // FIXME: this may be incorrect for some policies. abs_error.join_assign(this->absolute_error); FP_Linear_Form result = linearized_first_operand / intervalized_second_operand diff --git a/src/Floating_Point_Expression.templates.hh b/src/Floating_Point_Expression.templates.hh index 32059e8..9321527 100644 --- a/src/Floating_Point_Expression.templates.hh +++ b/src/Floating_Point_Expression.templates.hh @@ -43,9 +43,9 @@ Floating_Point_Expression<FP_Interval_Type, FP_Format> FP_Interval_Type current_term = lf.inhomogeneous_term(); FP_Interval_Type current_multiplier(std::max(abs(current_term.lower()), abs(current_term.upper()))); - FP_Linear_Form current_result_term = FP_Linear_Form(current_multiplier * - error_propagator); - FP_Linear_Form result = FP_Linear_Form(current_result_term); + FP_Linear_Form current_result_term(current_multiplier * + error_propagator); + FP_Linear_Form result = current_result_term;
// Handle the other terms. dimension_type dimension = lf.space_dimension(); diff --git a/src/Multiplication_Floating_Point_Expression.templates.hh b/src/Multiplication_Floating_Point_Expression.templates.hh index ca522e5..fcd8d9b 100644 --- a/src/Multiplication_Floating_Point_Expression.templates.hh +++ b/src/Multiplication_Floating_Point_Expression.templates.hh @@ -33,7 +33,7 @@ typename Multiplication_Floating_Point_Expression<FP_Interval_Type, FP_Format> ::linearize(const FP_Interval_Abstract_Store& store) const { /* FIXME: we currently adopt the Interval-Size Local strategy in order to - decide which of the two linear forms should be intervalized, as described + decide which of the two linear forms must be intervalized, as described in section 6.2.4 of Antoine Mine's thesis. We should also consider more refined strategies. */ @@ -73,7 +73,7 @@ typename Multiplication_Floating_Point_Expression<FP_Interval_Type, FP_Format>
// Here we do the actual computation. FP_Linear_Form result; - FP_Interval_Type abs_error = FP_Interval_Type(-this->absolute_error); + FP_Interval_Type abs_error(-this->absolute_error); // FIXME: this may be incorrect for some policies. abs_error.join_assign(this->absolute_error); if (intervalize_first) { diff --git a/src/Sum_Floating_Point_Expression.templates.hh b/src/Sum_Floating_Point_Expression.templates.hh index dfc43c0..9844a9b 100644 --- a/src/Sum_Floating_Point_Expression.templates.hh +++ b/src/Sum_Floating_Point_Expression.templates.hh @@ -32,7 +32,7 @@ typename Sum_Floating_Point_Expression<FP_Interval_Type, FP_Format> ::linearize(const FP_Interval_Abstract_Store& store) const { FP_Linear_Form linearized_first_operand = first_operand->linearize(store); FP_Linear_Form linearized_second_operand = second_operand->linearize(store); - FP_Interval_Type abs_error = FP_Interval_Type(-this->absolute_error); + FP_Interval_Type abs_error(-this->absolute_error); // FIXME: this may be incorrect for some policies. abs_error.join_assign(this->absolute_error); FP_Linear_Form result = linearized_first_operand + linearized_second_operand + diff --git a/src/Variable_Floating_Point_Expression.inlines.hh b/src/Variable_Floating_Point_Expression.inlines.hh index b88af52..fa4eda3 100644 --- a/src/Variable_Floating_Point_Expression.inlines.hh +++ b/src/Variable_Floating_Point_Expression.inlines.hh @@ -50,7 +50,7 @@ inline typename Variable_Floating_Point_Expression<FP_Interval_Type, FP_Format>::FP_Linear_Form Variable_Floating_Point_Expression<FP_Interval_Type, FP_Format> ::linearize(const FP_Interval_Abstract_Store& store) const { - FP_Linear_Form result = FP_Linear_Form(Variable(variable_index)); + FP_Linear_Form result(Variable(variable_index)); return result; }
participants (1)
-
Fabio Bossi