#5759: bug in divides [with patch, needs review]
------------------------------+---------------------------------------------
Reporter: was | Owner: somebody
Type: defect | Status: new
Priority: major | Milestone: sage-3.4.2
Component: basic arithmetic | Keywords:
------------------------------+---------------------------------------------
Description changed by kkilger:
Old description:
> The function "divides" does not work for generic commutative rings.
>
> 1. it is not checked that the elements are in the same space, i.e.
>
> Zmod(5)(1).divides(Zmod(2)(1)) is "True"
>
> 2. No division by zero checking is done! This gives for example an error
> if you type
>
> -> Zmod(2).zero_ideal() == Zmod(2).zero_ideal()
> -> Zmod(2).zero_ideal() == Zmod(2).unit_ideal()
>
> This patch should fix this.
New description:
The function "divides" does not work for generic commutative rings.
1. it is not checked that the elements are in the same space, i.e.
Zmod(5)(1).divides(Zmod(2)(1)) is "True"
2. No division by zero checking is done! This gives for example an error
if you type
-> Zmod(2).zero_ideal() == Zmod(2).zero_ideal()
-> Zmod(2).zero_ideal() == Zmod(2).unit_ideal()
This patch should fix this.
Greetings,
Kilian.
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5759#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
-~----------~----~----~----~------~----~------~--~---