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

Commit

Permalink
trac #17675: doc typo
Browse files Browse the repository at this point in the history
  • Loading branch information
videlec committed Jan 27, 2015
1 parent d05ac70 commit f0d7ca3
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions src/sage/rings/polynomial/polynomial_integer_dense_flint.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -712,8 +712,8 @@ cdef class Polynomial_integer_dense_flint(Polynomial):
resultant of ``self`` and ``other``.
As integer polynomials do not form a principal ideal domain, it is not
always possible given `p` and `q` to find a pair `s,t` sucht that
`gcd(a,b) = sa + tb`. Take `x+2` and `x+4` as an example for which the
always possible given `a` and `b` to find a pair `s,t` such that
`gcd(a,b) = sa + tb`. Take `a=x+2` and `b=x+4` as an example for which the
gcd is `1` but the best you can achieve in the Bezout identity is `2`.
If ``self`` and ``right`` are coprime as polynomials over the
Expand All @@ -723,15 +723,6 @@ cdef class Polynomial_integer_dense_flint(Polynomial):
EXAMPLES::
sage: P.<x> = PolynomialRing(ZZ)
sage: F = (x^2 + 2)*x^3; G = (x^2+2)*(x-3)
sage: g, u, v = F.xgcd(G)
sage: g, u, v
(27*x^2 + 54, 1, -x^2 - 3*x - 9)
sage: u*F + v*G
27*x^2 + 54
Here is a simple example where the result is not the gcd but the gcd
multiplied by the resultant::
sage: (x+2).xgcd(x+4)
(2, -1, 1)
Expand All @@ -740,6 +731,13 @@ cdef class Polynomial_integer_dense_flint(Polynomial):
sage: (x+2).gcd(x+4)
1
sage: F = (x^2 + 2)*x^3; G = (x^2+2)*(x-3)
sage: g, u, v = F.xgcd(G)
sage: g, u, v
(27*x^2 + 54, 1, -x^2 - 3*x - 9)
sage: u*F + v*G
27*x^2 + 54
sage: zero = P(0)
sage: x.xgcd(zero)
(x, 1, 0)
Expand All @@ -765,7 +763,7 @@ cdef class Polynomial_integer_dense_flint(Polynomial):
sage: R(2).xgcd(R.zero())
(2, 1, 0)
"""
# trivial casess first
# trivial cases first
if self.is_zero():
return (right, Integer(0), Integer(1))
elif right.is_zero():
Expand Down

0 comments on commit f0d7ca3

Please sign in to comment.