[PPL-devel] [GIT] ppl/ppl(floating_point): Fixed a bug in operator==.

Fabio Bossi bossi at cs.unipr.it
Wed Sep 9 10:16:55 CEST 2009


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

Author: Fabio Bossi <bossi at cs.unipr.it>
Date:   Wed Sep  9 10:17:52 2009 +0200

Fixed a bug in operator==.

---

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

diff --git a/src/Linear_Form.templates.hh b/src/Linear_Form.templates.hh
index ffa6772..e7c12f9 100644
--- a/src/Linear_Form.templates.hh
+++ b/src/Linear_Form.templates.hh
@@ -330,7 +330,7 @@ operator==(const Linear_Form<C>& x, const Linear_Form<C>& y) {
       if (x[i] != y[i])
         return false;
 
-    for (dimension_type i = x_size; --i > y_size; )
+    for (dimension_type i = x_size; --i >= y_size; )
       if (x[i] != x.zero)
         return false;
 
@@ -340,7 +340,7 @@ operator==(const Linear_Form<C>& x, const Linear_Form<C>& y) {
       if (x[i] != y[i])
         return false;
 
-    for (dimension_type i = y_size; --i > x_size; )
+    for (dimension_type i = y_size; --i >= x_size; )
       if (y[i] != x.zero)
         return false;
 




More information about the PPL-devel mailing list