[PPL-devel] [GIT] ppl/ppl(floating_point): Fixed an error introduced by previous commit .
Fabio Bossi
bossi at cs.unipr.it
Mon Sep 14 17:52:57 CEST 2009
Module: ppl/ppl
Branch: floating_point
Commit: 992d25ba23f3660bb462276ed5f921743179a4bf
URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=992d25ba23f3660bb462276ed5f921743179a4bf
Author: Fabio Bossi <bossi at cs.unipr.it>
Date: Mon Sep 14 17:06:20 2009 +0200
Fixed an error introduced by previous commit.
---
src/Linear_Form.templates.hh | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/Linear_Form.templates.hh b/src/Linear_Form.templates.hh
index db09aaf..fc7e81e 100644
--- a/src/Linear_Form.templates.hh
+++ b/src/Linear_Form.templates.hh
@@ -58,7 +58,7 @@ Linear_Form<C>::Linear_Form(const Variable v, const Variable w)
vec.resize(space_dim+1, zero);
if (v_space_dim != w_space_dim) {
vec[v_space_dim] = static_cast<C>(1.0);
- vec[w_space_dim] = -static_cast<C>(1.0);
+ vec[w_space_dim] = static_cast<C>(-1.0);
}
}
@@ -385,18 +385,18 @@ IO_Operators::operator<<(std::ostream& s, const Linear_Form<C>& f) {
const C& fv = f[v+1];
if (fv != 0) {
if (first) {
- if (fv == -static_cast<C>(1.0))
+ if (fv == 1.0)
s << "-";
- else if (fv != static_cast<C>(1.0))
+ else if (fv != 1.0)
s << fv << "*";
first = false;
}
else {
- if (fv == -static_cast<C>(1.0))
+ if (fv == -1.0)
s << " - ";
else {
s << " + ";
- if (fv != static_cast<C>(1.0))
+ if (fv != 1.0)
s << fv << "*";
}
}
More information about the PPL-devel
mailing list