__truediv__ to __mod__
This commit is contained in:
parent
f4885f813b
commit
d2187f2dbb
4
poly.py
4
poly.py
@ -59,7 +59,7 @@ class Polynomial():
|
||||
p1 = p1 * p1
|
||||
return p1
|
||||
|
||||
def __truediv__(self, p2):
|
||||
def __mod__(self, p2):
|
||||
p1 = self
|
||||
m = self.mod
|
||||
|
||||
@ -95,7 +95,7 @@ class Polynomial():
|
||||
if p2.poly == []:
|
||||
return p1
|
||||
|
||||
return p2.poly_gcd(p1 / p2)
|
||||
return p2.poly_gcd(p1 % p2)
|
||||
|
||||
def modDiv(a, b, m): # a*b^-1 (mod m)
|
||||
if gcd(b, m) != 1:
|
||||
|
Loading…
Reference in New Issue
Block a user