#18836: Make refine_embedding into a method of number fields instead of 
stand-alone
-------------------------------------+-------------------------------------
       Reporter:  cremona            |        Owner:
           Type:  enhancement        |       Status:  needs_work
       Priority:  minor              |    Milestone:  sage-6.8
      Component:  number fields      |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  John Cremona       |    Reviewers:  Vincent Delecroix
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/cremona/18836-refine_embedding   |  87cb9bec69f77d1a3b4f33dacef1b7d6043c5062
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------
Changes (by vdelecroix):

 * status:  needs_review => needs_work
 * reviewer:   => Vincent Delecroix


Comment:

 Hello John,

 - Could you be more uniform in notations: you wrote {{{RR}}} and {{{CC}}}
 but {{{``AA``}}} and {{{``QQbar``}}}.

 - {{{if not self is e.domain()}}} -> {{{if self is not e.domain()}}}

 - it is crazy that this function needs to compute '''all''' embeddings to
 refine '''one'''!! (might be for another ticket)

 - This is very obfuscated
 {{{
         diffs = [(RC(ee(self.gen()))-old_root).abs() for ee in elist]
         return elist[min(izip(diffs,count()))[1]]
 }}}
   Could you make it more readable like
 {{{
    diff_min = Infinity
    ans = None
    for ee in elist:
        diff = (RC(ee(self.gen())) - old_root).abs()
        if diff < diff_min:
            ans = ee
            diff_min = diff
    return ans
 }}}

 Vincent

--
Ticket URL: <http://trac.sagemath.org/ticket/18836#comment:2>
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.

Reply via email to