Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 15-create-plot-function
  • 17-test-jonas
  • main
3 results

Target

Select target project
  • darius.briquet/reed_solomon
1 result
Select Git revision
  • 15-create-plot-function
  • 17-test-jonas
  • main
3 results
Show changes
Commits on Source (2)
......@@ -9,19 +9,16 @@ class polynome():
self.prime_mod = 229
def show(self):
# TODO: OPTIMIZE IFs
for i in range(len(self.coefs) - 1, -1, -1):
power = ""
if self.coefs[i] != 0:
coef = str(self.coefs[i])
if i != 0: # its not 0's degree
power = f"x^{i} + "
else:
coef = ""
if i != 0:
power = f"x^{i} +"
else:
power = ""
print(f"{coef}{power} ", end="")
print()
print(f"{coef}{power}", end="")
print() # new line
def add(self, poly_2):
coeff_poly_1 = self.coefs
......