aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/galfact.spad.pamphlet
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-03-12 17:04:43 +0000
committerdos-reis <gdr@axiomatics.org>2011-03-12 17:04:43 +0000
commit52fddea19454dc2b9bcb54c6edd5a4cd4f5765a9 (patch)
tree4b13ccc6d57c7c1ee615c83615b246c98eae388a /src/algebra/galfact.spad.pamphlet
parent42d38bee45a64edfc12641053e58581c20584363 (diff)
downloadopen-axiom-52fddea19454dc2b9bcb54c6edd5a4cd4f5765a9.tar.gz
* src/algebra/: Systematically use negative? when comparing for
less than 0.
Diffstat (limited to 'src/algebra/galfact.spad.pamphlet')
-rw-r--r--src/algebra/galfact.spad.pamphlet12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/algebra/galfact.spad.pamphlet b/src/algebra/galfact.spad.pamphlet
index e596fc3a..56778a4f 100644
--- a/src/algebra/galfact.spad.pamphlet
+++ b/src/algebra/galfact.spad.pamphlet
@@ -506,7 +506,7 @@ GaloisGroupFactorizer(UP): Exports == Implementation where
brillhartIrreducible? f or
(useeisensteincriterion => eisensteinIrreducible?(f) ; false) =>
if reverse? then [ reverse f ] else [ f ]
- if leadingCoefficient(f)<0 then
+ if negative? leadingCoefficient(f) then
f := -f
negativelc? := true
cf: Union(LR,"failed")
@@ -548,7 +548,7 @@ GaloisGroupFactorizer(UP): Exports == Implementation where
r := max(2,r-#lfg)::N
if reverse? then lf := [ reverse(fact) for fact in lf ]
for i in 1..#lf repeat
- if leadingCoefficient(lf.i)<0 then lf.i := -lf.i
+ if negative? leadingCoefficient(lf.i) then lf.i := -lf.i
-- because we assume f with positive leading coefficient
lf
@@ -597,7 +597,7 @@ GaloisGroupFactorizer(UP): Exports == Implementation where
f := (f exquo c)::UP
-- make the leading coefficient positive
- if leadingCoefficient f < 0 then
+ if negative? leadingCoefficient f then
c := -c
f := -f
@@ -627,7 +627,7 @@ GaloisGroupFactorizer(UP): Exports == Implementation where
odd?(d) and (lcPol = reductum(f)) =>
for sfac in cyclotomicDecomposition(d)$CYC repeat
fac := subMinusX sfac
- if leadingCoefficient fac < 0 then fac := -fac
+ if negative? leadingCoefficient fac then fac := -fac
factorlist := cons([fac,1]$ParFact,factorlist)
[c,factorlist]$FinalFact
@@ -667,7 +667,7 @@ GaloisGroupFactorizer(UP): Exports == Implementation where
f := (f exquo c)::UP
-- make the leading coefficient positive
- if leadingCoefficient f < 0 then
+ if negative? leadingCoefficient f then
c := -c
f := -f
@@ -698,7 +698,7 @@ GaloisGroupFactorizer(UP): Exports == Implementation where
odd?(d) and (lcPol = reductum(f)) =>
for sfac in cyclotomicDecomposition(d)$CYC repeat
fac := subMinusX sfac
- if leadingCoefficient fac < 0 then fac := -fac
+ if negative? leadingCoefficient fac then fac := -fac
factorlist := cons([fac,1]$ParFact,factorlist)
[c,factorlist]$FinalFact