#5855: [with patch, needs work] implement squarefree_divisors function
------------------------------+---------------------------------------------
 Reporter:  rlm               |       Owner:  somebody
     Type:  enhancement       |      Status:  new     
 Priority:  minor             |   Milestone:  sage-4.0
Component:  basic arithmetic  |    Keywords:          
------------------------------+---------------------------------------------

Comment(by was):

 Note that is_prime_power explicitly coerces its input to ZZ first, whereas
 squarefree_divisors doesn't.

 Also, just because some code wasn't written in a certain way in arith.py
 long ago, doesn't mean we should continue in that direction now.   You
 might as well argue that lots of code has no doctests, so "it would seem
 reasonable to write lots more code with no doctests and then have someone
 make a new ticket to add doctests".  It's the same argument you make
 above, but with "doctests" instead of "making sense over more general
 rings".

 Regarding the actual patch, David says "Hmmm, is this supposed to work
 only for integers?".  Note that the first sentence of the docstring says
 "Iterator over the squarefree divisors of the integer N."

 The only reasonable options seem to be:

   1. This should be a method of integers, or

   2. The input should be coerced to ZZ, or

   3. The function is modified so it works over more general rings, and it
 is stated in the docs that it is "squarefree up to units", and works for
 any ring where the prime_divisors function works.   Note that
 prime_divisors works for *any* ring where factor works.


 I like 3 the best.

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