aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/numtheor.spad.pamphlet
diff options
context:
space:
mode:
Diffstat (limited to 'src/algebra/numtheor.spad.pamphlet')
-rw-r--r--src/algebra/numtheor.spad.pamphlet8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/algebra/numtheor.spad.pamphlet b/src/algebra/numtheor.spad.pamphlet
index b5cf7404..6df112a7 100644
--- a/src/algebra/numtheor.spad.pamphlet
+++ b/src/algebra/numtheor.spad.pamphlet
@@ -126,12 +126,12 @@ Using the half extended Euclidean algorithm we compute 1/a mod b.
borg:I:=b
c1:I := 1
d1:I := 0
- while b ^= 0 repeat
+ while b ~= 0 repeat
q:I := a quo b
r:I := a-q*b
(a,b):=(b,r)
(c1,d1):=(d1,c1-q*d1)
- a ^= 1 => error("moduli are not relatively prime")
+ a ~= 1 => error("moduli are not relatively prime")
positiveRemainder(c1,borg)
@
@@ -287,7 +287,7 @@ IntegerNumberTheoryFunctions(): Exports == Implementation where
jacobi : (I,I) -> I
++ \spad{jacobi(a,b)} returns the Jacobi symbol \spad{J(a/b)}.
++ When b is odd, \spad{J(a/b) = product(L(a/p) for p in factor b )}.
- ++ Note: by convention, 0 is returned if \spad{gcd(a,b) ^= 1}.
+ ++ Note: by convention, 0 is returned if \spad{gcd(a,b) ~= 1}.
++ Iterative \spad{O(log(b)^2)} version coded by Michael Monagan June 1987.
legendre : (I,I) -> I
++ \spad{legendre(a,p)} returns the Legendre symbol \spad{L(a/p)}.
@@ -560,7 +560,7 @@ PolynomialNumberTheoryFunctions(): Exports == Implementation where
MonicQuotient: (SUP(I),SUP(I)) -> SUP(I)
MonicQuotient (a,b) ==
- leadingCoefficient(b) ^= 1 => error "divisor must be monic"
+ leadingCoefficient(b) ~= 1 => error "divisor must be monic"
b = 1 => a
da := degree a
db := degree b -- assertion: degree b > 0