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/rderf.spad.pamphlet | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/algebra/rderf.spad.pamphlet') diff --git a/src/algebra/rderf.spad.pamphlet b/src/algebra/rderf.spad.pamphlet index 1cd6563d..dbf1eddf 100644 --- a/src/algebra/rderf.spad.pamphlet +++ b/src/algebra/rderf.spad.pamphlet @@ -73,7 +73,7 @@ TranscendentalRischDE(F, UP): Exports == Implementation where (~b0?) and (baseCase? or degree(u.b) > max(0, n)) => answ := SPDEnocancel1(u.b, u.c, u.m, derivation) [[u.alpha * answ.ans + u.beta, answ.nosol]] - (n > 0) and (b0? or degree(u.b) < n) => + positive? n and (b0? or degree(u.b) < n) => uansw := SPDEnocancel2(u.b,u.c,u.m,n,leadingCoefficient dt,derivation) uansw case ans=> [[u.alpha * uansw.ans.ans + u.beta, uansw.ans.nosol]] [[uansw.eq.b, uansw.eq.c, uansw.eq.m, @@ -131,7 +131,7 @@ TranscendentalRischDE(F, UP): Exports == Implementation where q:UP := 0 while cc ~= 0 repeat negative? d or negative?(n := (degree cc)::Z - dtm1) or n > d => return [[q, true]] - if n > 0 then + if positive? n then r := monomial((leadingCoefficient cc) / (n * lt), n::N) cc := cc - bb * r - derivation r d := n - 1 -- cgit v1.2.3