#12186: Faster norm calculations
-----------------------------+----------------------------------------------
   Reporter:  MvanBeek       |          Owner:  davidloeffler   
       Type:  enhancement    |         Status:  needs_work      
   Priority:  minor          |      Milestone:  sage-4.8        
  Component:  number fields  |       Keywords:  sd35            
Work_issues:                 |       Upstream:  N/A             
   Reviewer:                 |         Author:  Monique van Beek
     Merged:                 |   Dependencies:                  
-----------------------------+----------------------------------------------

Comment(by mstreng):

 The patch speeds up the case where the subfield is QQ, but ignores the
 case where K is a number field isomorphic to QQ, which is more likely to
 happen in practice, as the {{{subfields}}} method always returns such
 number fields.

 Without patch:
 {{{
 sage: x = var('x')
 sage: K1.<a1> = CyclotomicField(11)
 sage: K2.<a2> = K1.extension(x^2 - 3)
 sage: K3.<a3> = K2.extension(x^2 + 1)
 sage: t=a1+6*a2+a3*a1
 sage: %time t.norm()
 Wall time: 0.08 s
 46593592840125350650995659797233874763776
 sage: CPU times: user 0.10 s, sys: 0.00 s, total: 0.10 s
 sage: %time t.norm(QQ)
 CPU times: user 3.82 s, sys: 0.04 s, total: 3.86 s
 Wall time: 3.85 s
 46593592840125350650995659797233874763776
 sage: K = NumberField(x-1,'a')
 sage: %time t.norm(K)
 CPU times: user 11.28 s, sys: 0.14 s, total: 11.42 s
 Wall time: 11.43 s
 46593592840125350650995659797233874763776
 sage: K.degree()
 1
 sage: K is QQ
 False
 }}}
 Patch speeds up the second one to match the first, but leaves the third
 one as it is.

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

Reply via email to