#7589: bug in coercion and cyclotomic fields
--------------------------+-------------------------------------------------
Reporter: AlexGhitza | Owner: robertwb
Type: defect | Status: new
Priority: major | Milestone: sage-4.3
Component: coercion | Keywords:
Work_issues: | Author:
Upstream: N/A | Reviewer:
Merged: |
--------------------------+-------------------------------------------------
This should work automagically:
{{{
----------------------------------------------------------------------
| Sage Version 4.2.1, Release Date: 2009-11-14 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
sage: a = CyclotomicField(3).random_element()
sage: b = CyclotomicField(4).random_element()
sage: a + b
---------------------------------------------------------------------------
TypeError Traceback (most recent call
last)
/home/ghitza/.sage/temp/artin/9098/_home_ghitza__sage_init_sage_0.py in
<module>()
/home/ghitza/sage-devel/local/lib/python2.6/site-
packages/sage/structure/element.so in
sage.structure.element.ModuleElement.__add__
(sage/structure/element.c:6989)()
/home/ghitza/sage-devel/local/lib/python2.6/site-
packages/sage/structure/coerce.so in
sage.structure.coerce.CoercionModel_cache_maps.bin_op
(sage/structure/coerce.c:7021)()
TypeError: unsupported operand parent(s) for '+': 'Cyclotomic Field of
order 3 and degree 2' and 'Cyclotomic Field of order 4 and degree 2'
sage: a * b
---------------------------------------------------------------------------
TypeError Traceback (most recent call
last)
/home/ghitza/.sage/temp/artin/9098/_home_ghitza__sage_init_sage_0.py in
<module>()
/home/ghitza/sage-devel/local/lib/python2.6/site-
packages/sage/structure/element.so in
sage.structure.element.RingElement.__mul__
(sage/structure/element.c:10248)()
/home/ghitza/sage-devel/local/lib/python2.6/site-
packages/sage/structure/coerce.so in
sage.structure.coerce.CoercionModel_cache_maps.bin_op
(sage/structure/coerce.c:7021)()
TypeError: unsupported operand parent(s) for '*': 'Cyclotomic Field of
order 3 and degree 2' and 'Cyclotomic Field of order 4 and degree 2'
}}}
I think it's a coercion problem. If someone knows better, please change
the trac component accordingly.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7589>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.