/ to %
This commit is contained in:
parent
d2187f2dbb
commit
b34b9a42fb
4
hw4.py
4
hw4.py
@ -49,7 +49,7 @@ class QuotientRing():
|
||||
def idempotent(self):
|
||||
idems = []
|
||||
for rem in self.remainders:
|
||||
if (rem * rem / self.f) == (rem / self.f):
|
||||
if (rem * rem % self.f) == (rem % self.f):
|
||||
idems.append(rem)
|
||||
try:
|
||||
if idems[0].poly == []: #implementacja wielomianow ucina zera
|
||||
@ -63,7 +63,7 @@ class QuotientRing():
|
||||
phi = len([ i for i in range(1, self.m) if gcd(i, self.m) == 1 ])
|
||||
for zero_div in self.zero_divisors:
|
||||
for i in range(self.m):
|
||||
if len((zero_div ** i / self.f).poly) == 0:
|
||||
if len((zero_div ** i % self.f).poly) == 0:
|
||||
nils.append(zero_div)
|
||||
break
|
||||
return nils
|
||||
|
Loading…
Reference in New Issue
Block a user