#5496: fix bugs in is_prime (EASY)
---------------------------+------------------------------------------------
Reporter: was | Owner: was
Type: defect | Status: new
Priority: major | Milestone: sage-3.4.1
Component: number theory | Keywords:
---------------------------+------------------------------------------------
This is not good:
{{{
sage: is_prime(GF(5)(3))
True
sage: is_prime(GF(5)(4))
False
}}}
The fix is to totally 100% rewrite is_prime in arith.py so that it first
calls x.is_prime() and if that isn't defined, then in some special cases
(e.g., python ints) converts to Integer and calls is_prime. Otherwise, it
raises a NotImplementedError.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5496>
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
-~----------~----~----~----~------~----~------~--~---