diff options
author | dos-reis <gdr@axiomatics.org> | 2011-03-12 17:04:43 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2011-03-12 17:04:43 +0000 |
commit | 52fddea19454dc2b9bcb54c6edd5a4cd4f5765a9 (patch) | |
tree | 4b13ccc6d57c7c1ee615c83615b246c98eae388a /src/algebra/interval.spad.pamphlet | |
parent | 42d38bee45a64edfc12641053e58581c20584363 (diff) | |
download | open-axiom-52fddea19454dc2b9bcb54c6edd5a4cd4f5765a9.tar.gz |
* src/algebra/: Systematically use negative? when comparing for
less than 0.
Diffstat (limited to 'src/algebra/interval.spad.pamphlet')
-rw-r--r-- | src/algebra/interval.spad.pamphlet | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/algebra/interval.spad.pamphlet b/src/algebra/interval.spad.pamphlet index 3bd79aad..7fbd9fe8 100644 --- a/src/algebra/interval.spad.pamphlet +++ b/src/algebra/interval.spad.pamphlet @@ -129,7 +129,7 @@ Interval(R:Join(FloatingPointSystem,TranscendentalFunctionCategory)): IntervalCa contains?(u:%,f:R):Boolean == (f > inf(u)) and (f < sup(u)) positive?(u:%):Boolean == inf(u) > 0 - negative?(u:%):Boolean == sup(u) < 0 + negative?(u:%):Boolean == negative? sup(u) a:% < b:% == if inf(a) < inf(b) then @@ -163,7 +163,7 @@ Interval(R:Join(FloatingPointSystem,TranscendentalFunctionCategory)): IntervalCa a:Integer * b:% == if (a > 0) then qinterval(a*inf(b),a*sup(b)) - else if (a < 0) then + else if negative? a then qinterval(a*sup(b),a*inf(b)) else 0 |