diff options
Diffstat (limited to 'src/algebra/gaussian.spad.pamphlet')
-rw-r--r-- | src/algebra/gaussian.spad.pamphlet | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/algebra/gaussian.spad.pamphlet b/src/algebra/gaussian.spad.pamphlet index ccbd0728..b45a902e 100644 --- a/src/algebra/gaussian.spad.pamphlet +++ b/src/algebra/gaussian.spad.pamphlet @@ -157,7 +157,7 @@ ComplexCategory(R:CommutativeRing): Category == coordinates(x:%, v:Vector %):Vector(R) == ra := real(a := v(minIndex v)) rb := real(b := v(maxIndex v)) - (#v ^= 2) or + (#v ~= 2) or ((d := recip(ra * (ib := imag b) - (ia := imag a) * rb)) case "failed") =>error "coordinates: vector is not a basis" rx := real x @@ -332,12 +332,12 @@ ComplexCategory(R:CommutativeRing): Category == xx := x * y1 x1 := real(xx) rem r a := x1 - if x1^=0 and sizeLess?(r, 2 * x1) then + if x1~=0 and sizeLess?(r, 2 * x1) then a := x1 - r if sizeLess?(x1, a) then a := x1 + r x2 := imag(xx) rem r b := x2 - if x2^=0 and sizeLess?(r, 2 * x2) then + if x2~=0 and sizeLess?(r, 2 * x2) then b := x2 - r if sizeLess?(x2, b) then b := x2 + r y1 := (complex(a, b) exquo y1)::% @@ -759,7 +759,7 @@ ComplexIntegerSolveLinearPolynomialEquation(R,CR): C == T slpePrime:R:=(2::R) oldtable:Vector List CP := empty() solveLinearPolynomialEquation(lp,p) == - if (oldlp ^= lp) then + if (oldlp ~= lp) then -- we have to generate a new table deg:= _+/[degree u for u in lp] ans:Union(Vector List CP,"failed"):="failed" |