aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/sum.spad.pamphlet
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-03-12 17:04:43 +0000
committerdos-reis <gdr@axiomatics.org>2011-03-12 17:04:43 +0000
commit52fddea19454dc2b9bcb54c6edd5a4cd4f5765a9 (patch)
tree4b13ccc6d57c7c1ee615c83615b246c98eae388a /src/algebra/sum.spad.pamphlet
parent42d38bee45a64edfc12641053e58581c20584363 (diff)
downloadopen-axiom-52fddea19454dc2b9bcb54c6edd5a4cd4f5765a9.tar.gz
* src/algebra/: Systematically use negative? when comparing for
less than 0.
Diffstat (limited to 'src/algebra/sum.spad.pamphlet')
-rw-r--r--src/algebra/sum.spad.pamphlet4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/algebra/sum.spad.pamphlet b/src/algebra/sum.spad.pamphlet
index 1aa28145..e3d66075 100644
--- a/src/algebra/sum.spad.pamphlet
+++ b/src/algebra/sum.spad.pamphlet
@@ -162,7 +162,7 @@ GosperSummationMethod(E, V, R, P, Q): Exports == Impl where
-- sum(a(n), n) = q(n+1)/p(n) * a(n) * f(n).
-- 4. Bound the degree of f(n).
- (k := GosperDegBd(pn, qn, rn, n, newV)) < 0 => "failed"
+ negative?(k := GosperDegBd(pn, qn, rn, n, newV)) => "failed"
-- 5. Find a polynomial f of degree at most k, satisfying
-- p(n) = q(n+1)*f(n) - r(n)*f(n-1)
@@ -275,7 +275,7 @@ GosperSummationMethod(E, V, R, P, Q): Exports == Impl where
(p0 := retractIfCan(coefficient(p, 0))@Union(RN,"failed"))
case "failed" => "failed"
rt := -(p0::RN)/(p1::RN)
- rt < 0 or denom rt ~= 1 => "failed"
+ negative? rt or denom rt ~= 1 => "failed"
numer rt
@