-
-
Notifications
You must be signed in to change notification settings - Fork 514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix bugs in is_prime #5496
Comments
comment:1
Right now finite fields don't seem to have an is_prime function, so I believe that currently, is_prime(GF(5)(3)) should raise NotImplementedError. I'm going to try to fix is_prime so that it raises NotImplementedError for is_prime(GF(5)(3)). Kevin Stueve |
Attachment: 5496.patch.gz changed delegation of is_prime calculation to n.is_prime() |
Attachment: 5496.2.patch.gz |
comment:4
Apply only 5496.2.patch. |
Three small changes throughout the Sage library |
Attachment: trac5496_rationals_to_int.patch.gz Attachment: trac5496_symbolic_expressions.patch.gz Second addendum, for symbolic expressions |
Reviewer: spancratz |
comment:5
Applying Kevin's second patch |
Author: kstueve |
comment:6
should be
|
comment:7
Also, use |
Third addendum, for one character change for lucas numbers |
comment:8
Attachment: trac5496_lucas.patch.gz I've now incorporated the handling of symbolic expressions as suggested by Burcin. The sequence of patches should be applied in the order
I am running doctests now, but if they pass this should get positive review again. |
Attachment: trac5496_symbolic_expressions2.patch.gz Fourth addendum, for symbolic expressions |
comment:9
This is to confirm that all doctests have been passed, checked with "./sage -t devel/sage/sage". |
Changed author from kstueve to Kevin Stueve |
Changed reviewer from spancratz to Sebastian Pancratz |
Merged: sage-4.3.1.rc1 |
This is not good:
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.
Component: number theory
Author: Kevin Stueve
Reviewer: Sebastian Pancratz
Merged: sage-4.3.1.rc1
Issue created by migration from https://trac.sagemath.org/ticket/5496
The text was updated successfully, but these errors were encountered: