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/reclos.spad.pamphlet | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/algebra/reclos.spad.pamphlet') diff --git a/src/algebra/reclos.spad.pamphlet b/src/algebra/reclos.spad.pamphlet index c1359c1b..9c7e2ae7 100644 --- a/src/algebra/reclos.spad.pamphlet +++ b/src/algebra/reclos.spad.pamphlet @@ -118,7 +118,7 @@ RealPolynomialUtilitiesPackage(TheField,ThePols) : PUB == PRIV where while (p2 ~= 0) repeat res := cons(p2 , res) (p1 , p2) := (p2 , -(p1 rem p2)) - if degree(p1) > 0 + if positive? degree(p1) then p1 := unitCanonical(p1) res := [ term quo p1 for term in res ] @@ -247,7 +247,7 @@ RealRootCharacterizationCategory(TheField, ThePols ) : Category == PUB where negative? sign(toTest, rootChar) positive?(toTest, rootChar) == - sign(toTest, rootChar) > 0 + positive? sign(toTest, rootChar) rootOf(pol,n) == liste:List($):= allRootsOf(pol) @@ -633,7 +633,7 @@ RightOpenIntervalRootCharacterization(TheField,ThePolDom) : PUB == PRIV where lt := cons(t.int , lt) vi := sturmVariationsOf(reverse! lt)$UTIL o :Z := n - vl + vi - if o > 0 + if positive? o then sturmNthRoot(lp,int,r,vi,vr,o::N) else @@ -815,7 +815,7 @@ RightOpenIntervalRootCharacterization(TheField,ThePolDom) : PUB == PRIV where inv(leadingCoefficient(toTest))*reductum(toTest) delta := gcd(toTest,rootChar.defPol) newChar := [rootChar.low,rootChar.high,rootChar.defPol]$Rep - if degree(delta) > 0 + if positive? degree(delta) then if sign(delta.(rootChar.low) * delta.(rootChar.high)) <= 0 then -- cgit v1.2.3