Ticket #1494 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

[with patch, with positive review] bug coercing from maximal order of cyclotomic field into cyclotomic field

Reported by: was Owned by: somebody
Priority: major Milestone: sage-2.9
Component: basic arithmetic Keywords:
Cc: Work issues:
Report Upstream: Reviewers:
Authors: Merged in:
Dependencies: Stopgaps:

Description

sage: K.<z> = CyclotomicField(7)
sage: O = K.maximal_order()
sage: K(O.1)
Traceback (most recent call last):
...
TypeError: Cannot coerce element into this number field

Attachments

trac-1494.patch Download (1.3 KB) - added by was 5 years ago.
trac-1494-fixdoctest.patch Download (767 bytes) - added by cwitty 5 years ago.

Change History

Changed 5 years ago by was

comment:1 Changed 5 years ago by robertwb

I am wary of this patch, but will look into it more.

Changed 5 years ago by cwitty

comment:2 Changed 5 years ago by cwitty

  • Summary changed from bug coercing from maximal order of cyclotomic field into cyclotomic field to [with patch, with positive review] bug coercing from maximal order of cyclotomic field into cyclotomic field

Looks OK to me. The new doctest passes (after applying the trivial patch in trac-1494-fixdoctest.patch).

comment:3 Changed 5 years ago by robertwb

I was worried if there was some special reason we were calling _coerce_from_other_number_field here previously, but it looks OK.

This will probably be revised when coercion is flushed throughout the system anyways.

comment:4 Changed 5 years ago by mabshoff

  • Status changed from new to closed
  • Resolution set to fixed

Merged in 2.9.rc0.

Note: See TracTickets for help on using tickets.