From c93e84048964194e5674e859d6bd8827010f09f6 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sat, 12 Mar 2011 19:17:32 +0000 Subject: * src/algebra/: Systematically use negative? when comparing for greater than 0. --- src/algebra/interval.spad.pamphlet | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/algebra/interval.spad.pamphlet') diff --git a/src/algebra/interval.spad.pamphlet b/src/algebra/interval.spad.pamphlet index 7fbd9fe8..94eea0f5 100644 --- a/src/algebra/interval.spad.pamphlet +++ b/src/algebra/interval.spad.pamphlet @@ -128,7 +128,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 + positive?(u:%):Boolean == positive? inf(u) negative?(u:%):Boolean == negative? sup(u) a:% < b:% == @@ -161,7 +161,7 @@ Interval(R:Join(FloatingPointSystem,TranscendentalFunctionCategory)): IntervalCa a:Integer * b:% == - if (a > 0) then + if positive? a then qinterval(a*inf(b),a*sup(b)) else if negative? a then qinterval(a*sup(b),a*inf(b)) -- cgit v1.2.3