#17294: Add gcd to number field elements
-------------------------------------+-------------------------------------
Reporter: jdemeyer | Owner:
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-6.4
Component: number fields | Resolution:
Keywords: | Merged in:
Authors: Jeroen Demeyer | Reviewers: Vincent Delecroix
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/jdemeyer/ticket/17294 | 671d58fadd54519c02145d8905baf635b40c6e02
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Changes (by vbraun):
* status: positive_review => needs_work
Comment:
{{{
sage -t --warn-long 47.1 src/sage/categories/quotient_fields.py
**********************************************************************
File "src/sage/categories/quotient_fields.py", line 101, in
sage.categories.quotient_fields.QuotientFields.ElementMethods.gcd
Failed example:
gcd(t, i)
Expected:
Traceback (most recent call last):
...
TypeError: unable to find gcd
Got:
<BLANKLINE>
Traceback (most recent call last):
File "/mnt/disk/home/release/Sage/local/lib/python2.7/site-
packages/sage/doctest/forker.py", line 496, in _run
self.compile_and_execute(example, compiler, test.globs)
File "/mnt/disk/home/release/Sage/local/lib/python2.7/site-
packages/sage/doctest/forker.py", line 858, in compile_and_execute
exec(compiled, globs)
File "<doctest
sage.categories.quotient_fields.QuotientFields.ElementMethods.gcd[13]>",
line 1, in <module>
gcd(t, i)
File "/mnt/disk/home/release/Sage/local/lib/python2.7/site-
packages/sage/rings/arith.py", line 1551, in gcd
return GCD(b, **kwargs)
File "sage/structure/element.pyx", line 3473, in
sage.structure.element.NamedBinopMethod.__call__
(build/cythonized/sage/structure/element.c:28398)
return self._func(x,y, **kwds)
File "sage/rings/polynomial/polynomial_element.pyx", line 3713, in
sage.rings.polynomial.polynomial_element.Polynomial.gcd
(build/cythonized/sage/rings/polynomial/polynomial_element.c:34450)
raise NotImplementedError("%s does not provide a gcd
implementation for univariate polynomials"%self.base_ring())
NotImplementedError: Maximal Order in Number Field in i with defining
polynomial x^2 + 1 does not provide a gcd implementation for univariate
polynomials
**********************************************************************
File "src/sage/categories/quotient_fields.py", line 177, in
sage.categories.quotient_fields.QuotientFields.ElementMethods.lcm
Failed example:
lcm(t, i)
Expected:
Traceback (most recent call last):
...
AttributeError:
'sage.rings.polynomial.polynomial_element.Polynomial_generic_dense' object
has no attribute 'gcd'
Got:
<BLANKLINE>
Traceback (most recent call last):
File "/mnt/disk/home/release/Sage/local/lib/python2.7/site-
packages/sage/doctest/forker.py", line 496, in _run
self.compile_and_execute(example, compiler, test.globs)
File "/mnt/disk/home/release/Sage/local/lib/python2.7/site-
packages/sage/doctest/forker.py", line 858, in compile_and_execute
exec(compiled, globs)
File "<doctest
sage.categories.quotient_fields.QuotientFields.ElementMethods.lcm[11]>",
line 1, in <module>
lcm(t, i)
File "/mnt/disk/home/release/Sage/local/lib/python2.7/site-
packages/sage/rings/arith.py", line 1698, in lcm
return LCM(b)
File "sage/structure/element.pyx", line 3473, in
sage.structure.element.NamedBinopMethod.__call__
(build/cythonized/sage/structure/element.c:28398)
return self._func(x,y, **kwds)
File "sage/rings/polynomial/polynomial_element.pyx", line 3722, in
sage.rings.polynomial.polynomial_element.Polynomial.lcm
(build/cythonized/sage/rings/polynomial/polynomial_element.c:34544)
g = self.gcd(other)
File "sage/structure/element.pyx", line 3473, in
sage.structure.element.NamedBinopMethod.__call__
(build/cythonized/sage/structure/element.c:28398)
return self._func(x,y, **kwds)
File "sage/rings/polynomial/polynomial_element.pyx", line 3713, in
sage.rings.polynomial.polynomial_element.Polynomial.gcd
(build/cythonized/sage/rings/polynomial/polynomial_element.c:34450)
raise NotImplementedError("%s does not provide a gcd
implementation for univariate polynomials"%self.base_ring())
NotImplementedError: Maximal Order in Number Field in i with defining
polynomial x^2 + 1 does not provide a gcd implementation for univariate
polynomials
**********************************************************************
2 items had failures:
1 of 19 in
sage.categories.quotient_fields.QuotientFields.ElementMethods.gcd
1 of 17 in
sage.categories.quotient_fields.QuotientFields.ElementMethods.lcm
[153 tests, 2 failures, 0.99 s]
----------------------------------------------------------------------
sage -t --warn-long 47.1 src/sage/categories/quotient_fields.py # 2
doctests failed
----------------------------------------------------------------------
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/17294#comment:15>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.