This is a bug in Sage's finite field via NTL's GF2E implementation which is 
triggered by M4RIE:

sage: K.<a> = GF(2^15)
sage: type(K), type(matrix(K))
(sage.rings.finite_rings.finite_field_givaro.FiniteField_givaro_with_category,
 sage.matrix.matrix_mod2e_dense.Matrix_mod2e_dense)

sage: K.<a> = GF(2^16)
sage: type(K), type(matrix(K))
(sage.rings.finite_rings.finite_field_ntl_gf2e.FiniteField_ntl_gf2e_with_category,
 sage.matrix.matrix_mod2e_dense.Matrix_mod2e_dense)

sage: K.<a> = GF(2^17)
sage: type(K), type(matrix(K))
(sage.rings.finite_rings.finite_field_ntl_gf2e.FiniteField_ntl_gf2e_with_category,
 sage.matrix.matrix_generic_dense.Matrix_generic_dense)

I've fixed it at:

   http://trac.sagemath.org/ticket/17027

Cheers,
Martin

On Saturday 20 Sep 2014 04:07:08 Volker Braun wrote:
> I still get the overflow with the m4ri update that is bound to be in
> 6.4.beta4. Martin, any ideas?
> 
> On Friday, September 19, 2014 5:25:46 AM UTC+1, Michiel Kosters wrote:
> > I have a similar bug with the following code:
> > 
> > n=16
> > F.<a>=GF(2^n)
> > print Matrix([a]), F(0)
> > print Matrix([F(0)])
> > 
> > The last print statement gives an error OverflowError: cannot convert
> > float infinity to integer
> > For other n, the code does not give an error.
> > 
> > Yours,
> > Michiel
> > 
> > On Tuesday, July 8, 2014 10:21:06 PM UTC+8, David Hoo wrote:
> >> I happened to meet a overflow error, I install sage 6.2 both on a 64-bit
> >> macbook running MacOS 10.9 and 32-bit Dell Desktop running Ubuntu 12.04.
> >> 
> >> The error message goes like this:
> >> 
> >> OverflowError                             Traceback (most recent call
> >> last)
> >> 
> >> <ipython-input-7-8d411648858e> in <module>()
> >> 
> >> ----> 1 get_ipython().magic(u'runfile DataCollecctionScript.py')
> >> 
> >> 
> >> 
> >> 
> >> /Applications/Sage-6.2.app/Contents/Resources/sage/local/lib/python2.7/si
> >> te-packages/IPython/core/interactiveshell.pyc in magic(self, arg_s)
> >> 
> >> *   2163*         magic_name, _, magic_arg_s = arg_s.partition(' ')
> >> 
> >> *   2164*         magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
> >> 
> >> -> 2165         return self.run_line_magic(magic_name, magic_arg_s)
> >> 
> >> *   2166*
> >> 
> >> *   2167*
> >> #------------------------------------------------------------------------
> >> -
> >> 
> >> 
> >> 
> >> 
> >> /Applications/Sage-6.2.app/Contents/Resources/sage/local/lib/python2.7/si
> >> te-packages/IPython/core/interactiveshell.pyc in run_line_magic(self,
> >> magic_name, line)
> >> 
> >> *   2084*                 kwargs['local_ns'] = sys._getframe(stack_depth
> >> ).f_locals
> >> 
> >> *   2085*             with self.builtin_trap:
> >> 
> >> -> 2086                 result = fn(*args,**kwargs)
> >> 
> >> *   2087*             return result
> >> 
> >> *   2088*
> >> 
> >> 
> >> 
> >> 
> >> /Applications/Sage-6.2.app/Contents/Resources/sage/local/lib/python2.7/si
> >> te-packages/sage/repl/ipython_extension.pyc in runfile(self, s)
> >> 
> >> 
> >> 
> >> 
> >> /Applications/Sage-6.2.app/Contents/Resources/sage/local/lib/python2.7/si
> >> te-packages/IPython/core/magic.pyc in <lambda>(f, *a, **k)
> >> 
> >> *    189*     # but it's overkill for just that one bit of state.
> >> 
> >> *    190*     def magic_deco(arg):
> >> 
> >> --> 191         call = lambda f, *a, **k: f(*a, **k)
> >> 
> >> *<span style="font-size:14.0pt; font-family:&quot*
> >> ...

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to