summaryrefslogtreecommitdiff
path: root/impl/Complete.hpp
diff options
context:
space:
mode:
authorCarlo Zancanaro <carlo@carlo-laptop>2012-10-23 15:16:31 +1100
committerCarlo Zancanaro <carlo@carlo-laptop>2012-10-23 15:16:31 +1100
commit3002319eb5fd6b3eff0ffa764534bb571536a08c (patch)
treec2f79591a54aff370b34717ebf50358f62d4bda4 /impl/Complete.hpp
parenta1b28d756fe52a53d9d4da4d23853969fd529115 (diff)
parent14c0c8bb717a668084cae8cd4b359ffd6fca73b0 (diff)
Merge branch 'master' of https://bitbucket.org/czan/honours
Conflicts: .gitignore impl/MaxStrategy.hpp impl/VariableAssignment.hpp impl/systems/test.eqns impl/test/7.eqns
Diffstat (limited to 'impl/Complete.hpp')
-rw-r--r--impl/Complete.hpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/impl/Complete.hpp b/impl/Complete.hpp
index 38b637e..336ab24 100644
--- a/impl/Complete.hpp
+++ b/impl/Complete.hpp
@@ -55,7 +55,11 @@ struct Complete {
return Complete<T>(- _value, _infinity);
}
Complete operator+(const Complete& other) const {
- if (_infinity) {
+ if (_infinity && other._infinity) {
+ if (_value > 0 || other._value > 0)
+ return Complete<T>(1, true);
+ return Complete<T>(-1, true);
+ } else if (_infinity) {
return *this;
} else if (other._infinity) {
return other;