From 52fddea19454dc2b9bcb54c6edd5a4cd4f5765a9 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sat, 12 Mar 2011 17:04:43 +0000 Subject: * src/algebra/: Systematically use negative? when comparing for less than 0. --- src/algebra/irexpand.spad.pamphlet | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/algebra/irexpand.spad.pamphlet') diff --git a/src/algebra/irexpand.spad.pamphlet b/src/algebra/irexpand.spad.pamphlet index 6e819c13..1441447a 100644 --- a/src/algebra/irexpand.spad.pamphlet +++ b/src/algebra/irexpand.spad.pamphlet @@ -111,7 +111,7 @@ IntegrationResultToFunction(R, F): Exports == Implementation where nn := lgp + d * sqrn * ilog(e, f * sqrn, setUnion(setUnion(kernels a, kernels b), kernels p0)) sqr.sgn > 0 => [pp] - sqr.sgn < 0 => [nn] + negative? sqr.sgn => [nn] [pp, nn] -- returns 2 atan(a/b) or 2 atan(-b/a) whichever looks better @@ -194,7 +194,7 @@ IntegrationResultToFunction(R, F): Exports == Implementation where empty? ly => true for x in lx repeat for y in ly repeat - ((s := sign(x*y)) case Z) and (s::Z < 0) => return false + ((s := sign(x*y)) case Z) and negative?(s::Z) => return false true pairsum(lx, ly) == -- cgit v1.2.3