#4837: [with patch, not ready for review] implement random_element for number
fields
-----------------------------------------+----------------------------------
 Reporter:  AlexGhitza                   |        Owner:  AlexGhitza
     Type:  enhancement                  |       Status:  new       
 Priority:  major                        |    Milestone:  sage-3.4  
Component:  number theory                |   Resolution:            
 Keywords:  random element number field  |  
-----------------------------------------+----------------------------------
Comment (by cremona):

 Alex, I just noticed that you can do this in one line with

 K(K.polynomial_ring().random_element(degree=K.degree()-1))

 since K.polynomial_ring is *not* K[x] but is the polynomial ring over K's
 base field, whatever that is.  So this will automatically work ok
 recursively, given that the random_element() method for polynomial rings
 uses the random_element() method for the coefficient ring.

 John

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