#5213: make charpoly/minpoly of number field elements use matrix()
---------------------------------------------------+------------------------
 Reporter:  ncalexan                               |        Owner:  was     
     Type:  defect                                 |       Status:  new     
 Priority:  minor                                  |    Milestone:  sage-3.3
Component:  number theory                          |   Resolution:          
 Keywords:  number field element minpoly charpoly  |  
---------------------------------------------------+------------------------
Comment (by AlexGhitza):

 Actually, on my laptop, with the example

 {{{
 sage: R.<x> = ZZ[]
 sage: f = x^32 - x^31 + 2*x^30 - x^28 - 2*x^27 + 8*x^26 + 2*x^25 + 2*x^24
 + x^22 - 2*x^20 + x^18 + x^17 - 3*x^16 + 51*x^15 - 2*x^14 - 5*x^13 +
 3*x^12 - x^9 + x^8 - x^7 - 2*x^6 - 2*x^5 - x^4 + 5
 sage: K.<a> = NumberField(f)
 sage: b = -1/2*a^31 - 12*a^30 + a^29 - 1/64*a^28 + 2/3*a^26 + 1/7*a^25 -
 2*a^24 + 1/3*a^19 - 6*a^18 - 11*a^17 - 2*a^15 + 1/32*a^14 + a^13 + a^11 -
 1/17*a^9 + 2*a^8 + 1/32*a^6 + a^5 + 1/6*a^4 + 2*a^3 - 2/3*a^2 - 59*a + 1
 }}}

 I get, before the patch:

 {{{
 sage: time c = b.charpoly()
 CPU times: user 0.15 s, sys: 0.00 s, total: 0.15 s
 Wall time: 0.14 s
 }}}

 and after the patch:

 {{{
 sage: time c = b.charpoly()
 CPU times: user 0.03 s, sys: 0.00 s, total: 0.03 s
 Wall time: 0.04 s
 }}}

 Just for the heck of it, I tried a degree 61 extension, and I get 7.44
 seconds before the patch, and 0.26 seconds after it.

 So I'm motivated to review it :)

 Nick, if you're reading this, do you have an example where the new code is
 significantly slower?

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5213#comment:4>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
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