[PPL-devel] [GIT] ppl/ppl(master): A strict relation info is required here too.
Abramo Bagnara
abramo.bagnara at gmail.com
Fri May 15 18:27:04 CEST 2009
Module: ppl/ppl
Branch: master
Commit: 4845f4d529daf3beb90f9d49ba188b0c5e087396
URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=4845f4d529daf3beb90f9d49ba188b0c5e087396
Author: Abramo Bagnara <abramo.bagnara at gmail.com>
Date: Fri May 15 18:27:01 2009 +0200
A strict relation info is required here too.
---
src/math_utilities.inlines.hh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/math_utilities.inlines.hh b/src/math_utilities.inlines.hh
index b599d2b..dc06c30 100644
--- a/src/math_utilities.inlines.hh
+++ b/src/math_utilities.inlines.hh
@@ -92,7 +92,7 @@ template <typename T, typename Policy>
inline bool
is_even(const Checked_Number<T, Policy>& x) {
Checked_Number<T, Policy> half_x;
- return div_2exp_assign_r(half_x, x, 1, ROUND_DIRECT) == V_EQ
+ return div_2exp_assign_r(half_x, x, 1, ROUND_DIRECT | ROUND_STRICT_RELATION) == V_EQ
&& is_integer(half_x);
}
@@ -101,7 +101,7 @@ inline bool
is_additive_inverse(const Checked_Number<T, Policy>& x,
const Checked_Number<T, Policy>& y) {
Checked_Number<T, Policy> negated_x;
- return neg_assign_r(negated_x, x, ROUND_DIRECT) == V_EQ
+ return neg_assign_r(negated_x, x, ROUND_DIRECT | ROUND_STRICT_RELATION) == V_EQ
&& negated_x == y;
}
More information about the PPL-devel
mailing list