From 6c75a87d8ee00d48a0f5703aa9c86591078a50d3 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sat, 12 Mar 2011 22:56:37 +0000 Subject: * src/algebra/: Systematically use not one? when comparing for equality with 1. --- src/algebra/laplace.spad.pamphlet | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/algebra/laplace.spad.pamphlet') diff --git a/src/algebra/laplace.spad.pamphlet b/src/algebra/laplace.spad.pamphlet index 9bbabadb..8a04817b 100644 --- a/src/algebra/laplace.spad.pamphlet +++ b/src/algebra/laplace.spad.pamphlet @@ -134,7 +134,7 @@ LaplaceTransform(R, F): Exports == Implementation where [c, c1, c0] if (v := isPower f) case Record(val:F, exponent:Integer) then w := v::Record(val:F, exponent:Integer) - (w.exponent ~= 1) and + not one?(w.exponent) and ((r := aexp(w.val, t)) case Record(coef:F,coef1:F,coef0:F)) => rec := r::Record(coef:F, coef1:F, coef0:F) return [rec.coef ** w.exponent, w.exponent * rec.coef1, @@ -194,7 +194,7 @@ LaplaceTransform(R, F): Exports == Implementation where -- Use linearity (u := mkPlus f) case List(F) => +/[locallaplace(g, t, tt, s, ss) for g in u::List(F)] - (rec := splitConstant(f, t)).const ~= 1 => + not one?((rec := splitConstant(f, t)).const) => rec.const * locallaplace(rec.nconst, t, tt, s, ss) -- laplace(t^n*f(t),t,s) = (-1)^n*D(laplace(f(t),t,s), s, n)) -- cgit v1.2.3