aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/intfact.spad.pamphlet
diff options
context:
space:
mode:
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)