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

Commit 74cdf73

Browse files
author
Thierry Monteil
committed
#3330 : add doctest for xgcd for polynomials over relative number fields.
1 parent 1a64da2 commit 74cdf73

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/sage/arith/misc.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1917,6 +1917,16 @@ def xgcd(a, b):
19171917
(4, 1, 0)
19181918
sage: xgcd(4, mpz(8)) # optional - gmpy2
19191919
(4, 1, 0)
1920+
1921+
TESTS:
1922+
1923+
We check that :trac:`3330` has been fixed::
1924+
1925+
sage: R.<a,b> = NumberField(x^2-3,'g').extension(x^2-7,'h')[]
1926+
sage: h = R.base_ring().gen()
1927+
sage: S.<y> = R.fraction_field()[]
1928+
sage: xgcd(y^2, a*h*y+b)
1929+
(1, 7*a^2/b^2, (((-h)*a)/b^2)*y + 1/b)
19201930
"""
19211931
try:
19221932
return a.xgcd(b)

0 commit comments

Comments
 (0)