#5759: [with patch, needs work] bug in divides
------------------------------+---------------------------------------------
 Reporter:  was               |       Owner:  was       
     Type:  defect            |      Status:  new       
 Priority:  major             |   Milestone:  sage-4.1.2
Component:  basic arithmetic  |    Keywords:            
 Reviewer:                    |      Author:            
   Merged:                    |  
------------------------------+---------------------------------------------

Comment(by cremona):

 I would have thought that even in this generality (element of a
 commutative ring) it would be worth adding the following special cases:

    1. if self=1 return True
    1. if x =0 return True; else if self =0 return False
    1. if self.is_unit() return True

 where in each case the test is wrapped in a try/except block so that if
 (for example) self.is_unit() is not implemented then it just passes.
 Finally, if none of the above works then default to code as it is now.

 Any individual ring where the x%self computation will not work but where
 there is an easy alternative direct test (such as in Integers(n)) can have
 their own specific implementations.

 If there is any support for this I'm willing to try to do it.

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