aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/intfact.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/intfact.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/intfact.spad.pamphlet')
-rw-r--r--src/algebra/intfact.spad.pamphlet6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/algebra/intfact.spad.pamphlet b/src/algebra/intfact.spad.pamphlet
index 8615cf7f..f8655319 100644
--- a/src/algebra/intfact.spad.pamphlet
+++ b/src/algebra/intfact.spad.pamphlet
@@ -311,7 +311,7 @@ IntegerRoots(I:IntegerNumberSystem): Exports == Implementation where
"failed"
perfectSqrt a ==
- a < 0 or not member?(a rem (144::I), resMod144) => "failed"
+ negative? a or not member?(a rem (144::I), resMod144) => "failed"
(s := approxSqrt a) * s = a => s
"failed"
@@ -369,7 +369,7 @@ IntegerFactorizationPackage(I): Exports == Implementation where
squareFree(n:I):FF ==
u:I
- if n<0 then (m := -n; u := -1)
+ if negative? n then (m := -n; u := -1)
else (m := n; u := 1)
(m > 1) and ((v := perfectSqrt m) case I) =>
sv : FF
@@ -464,7 +464,7 @@ IntegerFactorizationPackage(I): Exports == Implementation where
BasicMethod n ==
u:I
- if n<0 then (m := -n; u := -1)
+ if negative? n then (m := -n; u := -1)
else (m := n; u := 1)
x := BasicSieve(m, 1 + approxSqrt m)
makeFR(u, factorList x)