#5535: is_primitive is computes integer prime factorization on every call
-------------------------+--------------------------------------------------
 Reporter:  rhinton      |       Owner:  tbd
     Type:  enhancement  |      Status:  new
 Priority:  major        |   Milestone:     
Component:  algebra      |    Keywords:     
-------------------------+--------------------------------------------------
 The current (generic) code for is_primitive in
 rings/polynomial/polynomial_element.pyx is
 {{{
         if not self.is_irreducible():
             return False
         p = self.parent().characteristic()
         n = p ** self.degree() - 1
         y = self.parent().quo(self).gen()
         for d in n.prime_divisors():
             if ( y ** (n//d) ) == 1:
                 return False
         return True
 }}}
 Note that the integer n and its prime divisors are calculated as part of
 the algorithm.  This calculation can be lengthy for large n, and can
 dominate the running time of the algorithm.

 The proposed patch adds optional arguments to is_primitive to provide the
 results of these calculations -- useful for is_primitive tests for
 multiple polynomials of the same degree.

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