#14888: Make FiniteField_pari_ffelt the default for generic finite fields
-------------------------------------+-------------------------------------
Reporter: pbruin | Owner: cpernet
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-5.13
Component: finite rings | Resolution:
Keywords: FiniteField | Merged in:
performance | Reviewers: Jean-Pierre Flori,
Authors: Peter Bruin | Jeroen Demeyer
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: #12142, #15124, | Stopgaps:
#15125 |
-------------------------------------+-------------------------------------
Comment (by jdemeyer):
Some more news from the debugging camp: I added
{{{
#!diff
diff --git a/sage/rings/finite_rings/element_pari_ffelt.pyx
b/sage/rings/finite_rings/element_pari_ffelt.pyx
--- a/sage/rings/finite_rings/element_pari_ffelt.pyx
+++ b/sage/rings/finite_rings/element_pari_ffelt.pyx
@@ -450,6 +450,7 @@
pari_catch_sig_on()
x.construct(FF_add((<FiniteFieldElement_pari_ffelt>self).val,
(<FiniteFieldElement_pari_ffelt>right).val))
+ print "%s + %s = %s"%(self, right, x)
return x
cpdef ModuleElement _sub_(FiniteFieldElement_pari_ffelt self,
ModuleElement right):
@@ -482,6 +483,7 @@
pari_catch_sig_on()
x.construct(FF_mul((<FiniteFieldElement_pari_ffelt>self).val,
(<FiniteFieldElement_pari_ffelt>right).val))
+ print "%s * %s = %s"%(self, right, x)
return x
cpdef RingElement _div_(FiniteFieldElement_pari_ffelt self,
RingElement right):
}}}
and adjusted some doctests. This clearly shows the error in the conversion
to PARI:
{{{
sage -t devel/sage/sage/schemes/plane_conics/con_finite_field.py
**********************************************************************
File "devel/sage/sage/schemes/plane_conics/con_finite_field.py", line 108,
in
sage.schemes.plane_conics.con_finite_field.ProjectiveConic_finite_field.?
Failed example:
C = Conic([1, a, -5]); C
Expected:
a * 1 = a
0 + a = a
0 + 2 = 2
Projective Conic Curve over Finite Field in a of size 7^20 defined by
x^2 + (a)*y^2 + 2*z^2
Got:
a * 0 = 0
0 + 0 = 0
0 + 2 = 2
Projective Conic Curve over Finite Field in a of size 7^20 defined by
x^2 + (a)*y^2 + 2*z^2
**********************************************************************
File "devel/sage/sage/schemes/plane_conics/con_finite_field.py", line 113,
in
sage.schemes.plane_conics.con_finite_field.ProjectiveConic_finite_field.?
Failed example:
C._coefficients
Expected:
[1, 0, 0, a, 0, 2]
Got:
[1, 0, 0, 0, 0, 2]
**********************************************************************
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/14888#comment:33>
Sage <http://www.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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.