#12584: coercing large numbers into elements of GF fails
-----------------------------+----------------------------------------------
Reporter: dsm | Owner: davidloeffler
Type: defect | Status: new
Priority: major | Milestone: sage-5.0
Component: number fields | Keywords:
Work_issues: | Upstream: N/A
Reviewer: | Author:
Merged: | Dependencies:
-----------------------------+----------------------------------------------
{{{
sage: GF(2**16,'a')(2**63-2)
0
sage: GF(2**16,'a')(2**63-1)
1
sage: GF(2**16,'a')(2**63)
---------------------------------------------------------------------------
OverflowError Traceback (most recent call
last)
[...]
OverflowError: long int too large to convert to int
}}}
Note that this is backend-dependent:
{{{
sage: FF =
sage.rings.finite_rings.finite_field_ext_pari.FiniteField_ext_pari
sage: FF(2**16,'a')(2**63)
0
sage: FF(2**32,'a')(2**100)
0
sage: GF(2**16,'a') == FF(2**16, 'a')
True
}}}
See [http://ask.sagemath.org/question/1176/nist-b-283-elliptic-curve this
ask.sagemath.question] for a case in the wild.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12584>
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 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.