#13765: Cyclotomic embeddings should respect coercions.
-----------------------------------+----------------------------------------
       Reporter:  robertwb         |         Owner:  davidloeffler
           Type:  defect           |        Status:  needs_work   
       Priority:  critical         |     Milestone:  sage-5.7     
      Component:  number fields    |    Resolution:               
       Keywords:                   |   Work issues:               
Report Upstream:  N/A              |     Reviewers:               
        Authors:  Robert Bradshaw  |     Merged in:               
   Dependencies:                   |      Stopgaps:               
-----------------------------------+----------------------------------------
Changes (by ehlen):

  * status:  needs_review => needs_work


Comment:

 * I tested the patch using Sage 5.5.
 * It is well documented and it solves the bug as far as I can see.
 * The documentation builds.

 But I am not convinced that the implementation of
 NumberField_cyclotomic._log_gen should stay like it is. It is a private
 method but it might be used within the class for ther purposes later.
 Therefore, I think the output should always make sense. But it doesn't
 always and it is not completely consistent. Here is an Example.

 This is what I expect from the documentation:

 {{{
  sage: K.<zeta>=CyclotomicField(5, embedding=CC(exp(2*pi*i/5)))
  sage: K._log_gen(10)
  sage: type(K._log_gen(10))
  <type 'NoneType'>
 }}}

 So, this is o.k., but:
 {{{
  sage: K.<zeta>=CyclotomicField(5, embedding=CC(exp(2*pi*i/5)))
  sage: K._log_gen(CDF(10))
  sage: 0
  sage: type(K._log_gen(CDF(10)))
  sage: <type 'sage.rings.integer.Integer'>
 }}}

 This behaviour is more or less documented in the docstring. It says that
 "If x is complex, returns the nearest such e whether or not the result is
 exact.". But I don't agree that it should be this way.

 But I think this is not consistent and it should be fixed.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13765#comment:9>
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].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to