pretty print fix
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
def pretty_print(poly):
|
def pretty_print(poly):
|
||||||
ring = poly.parent()
|
|
||||||
|
|
||||||
R_terms = []
|
R_terms = []
|
||||||
r_terms = []
|
r_terms = []
|
||||||
x_terms = []
|
x_terms = []
|
||||||
mixed_terms = []
|
mixed_terms = []
|
||||||
|
|
||||||
|
has_const = bool(poly.constant_coefficient())
|
||||||
|
|
||||||
for monom in poly:
|
for monom in poly:
|
||||||
vars_in_term = [str(v) for v in monom.variables()]
|
vars_in_term = [str(v) for v in monom.variables()]
|
||||||
|
|
||||||
@@ -26,6 +26,9 @@ def pretty_print(poly):
|
|||||||
|
|
||||||
parts = []
|
parts = []
|
||||||
|
|
||||||
|
if has_const:
|
||||||
|
parts.append("1")
|
||||||
|
|
||||||
if R_terms:
|
if R_terms:
|
||||||
parts.append("f(Ri)")
|
parts.append("f(Ri)")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user