Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit b6c62d0

Browse files
committed
Fix doctests
and put these factorizations in here that look much nicer/make much more sense.
1 parent c17adf7 commit b6c62d0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/sage/rings/fraction_field.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ def _factor_univariate_polynomial(self, f):
864864
sage: R.<x> = K[]
865865
sage: f = x^3 + a
866866
sage: f.factor()
867-
(t + 2*a + 1)^3
867+
(x + 2*a + 1)^3
868868
869869
"""
870870
# The default implementation would try to convert this element to singular and factor there.

src/sage/rings/polynomial/polynomial_element.pyx

+2-2
Original file line numberDiff line numberDiff line change
@@ -3993,9 +3993,9 @@ cdef class Polynomial(CommutativeAlgebraElement):
39933993
sage: factor(x)
39943994
x
39953995
sage: factor(x^2 - q^2)
3996-
(-1) * (-x + q) * (x + q)
3996+
(x - q) * (x + q)
39973997
sage: factor(x^2 - q^-2)
3998-
(1/q^2) * (q*x - 1) * (q*x + 1)
3998+
(x - 1/q) * (x + 1/q)
39993999
40004000
sage: P.<a,b,c> = PolynomialRing(ZZ)
40014001
sage: R.<x> = PolynomialRing(FractionField(P))

0 commit comments

Comments
 (0)