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/gaussfac.spad.pamphlet | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/algebra/gaussfac.spad.pamphlet') diff --git a/src/algebra/gaussfac.spad.pamphlet b/src/algebra/gaussfac.spad.pamphlet index 8f922d92..bb4cb963 100644 --- a/src/algebra/gaussfac.spad.pamphlet +++ b/src/algebra/gaussfac.spad.pamphlet @@ -132,7 +132,7 @@ GaussianFactorizationPackage() : C == T result : List FFE :=[] unity:ZI:=1$ZI - if d~=1 then + if not one? d then a:=(a exquo d)::Z b:=(b exquo d)::Z r:= intfactor(d) @@ -163,13 +163,13 @@ GaussianFactorizationPackage() : C == T m:=m quo z result:=concat(part,result) - if m~=1 then unity:=unity * m + if not one? m then unity:=unity * m makeFR(unity,result) ---- write p prime like sum of two squares ---- sumSquares(p:Z) : List Z == p=2 => [1,1] - p rem 4 ~= 1 => error "no solutions" + not one?(p rem 4) => error "no solutions" sumsq1(p) -- cgit v1.2.3