#4899: bug in sqrt(1) over GF(2^e) for e>15
---------------------+------------------------------------------------------
Reporter: cremona | Owner: tbd
Type: defect | Status: new
Priority: minor | Milestone: sage-3.4
Component: algebra | Keywords: finite fields
---------------------+------------------------------------------------------
{{{
sage: GF(2^15,'a')(1).sqrt()
1
sage: GF(2^16,'a')(1).sqrt()
---------------------------------------------------------------------------
AttributeError Traceback (most recent call
last)
/home/john/<ipython console> in <module>()
/home/john/sage-3.2.2.rc1/local/lib/python2.5/site-
packages/sage/rings/finite_field_ntl_gf2e.so in
sage.rings.finite_field_ntl_gf2e.FiniteField_ntl_gf2eElement.sqrt
(sage/rings/finite_field_ntl_gf2e.cpp:7072)()
AttributeError: 'sage.rings.finite_field_ntl_gf2e.FiniteField_ntl_g'
object has no attribute '_one_element'
}}}
The point is that {{{GF(2^16)}}} (and higher) are of type
'sage.rings.finite_field_ntl_gf2e.FiniteField_ntl_gf2e'
and the code (lines 826,827 in finite_field_ntl_gf2e.pyx)
{{{
if self.is_one():
return self._one_element
}}}
fails. It should be self.parent()._one_element (though I don't know why
"return self" would not be ok too).
Patch up very soon.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4899>
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
-~----------~----~----~----~------~----~------~--~---