It is not F[0] it is F(0). :-) The example cited is definitely a bug, 
perhaps from sage. Note the following:

sage: M = matrix(F, [[1],[0]])                                             
     
sage: type(M)
<type 'sage.matrix.matrix_mod2e_dense.Matrix_mod2e_dense'>
sage: M
<repr(<sage.matrix.matrix_mod2e_dense.Matrix_mod2e_dense at 0x7fbcf6f65e20>) 
failed: OverflowError: cannot convert float infinity to integer>

So, sage doesn't even realize that the underlying library m4rie(?) crashed. 
For larger powers, sage uses some other library (what?). Maybe we should 
switch to that from 2^16 onwards


sage: F = GF(2**17, 'a')
sage: M = matrix(F, [[1],[0]])
sage: type(M)
<type 'sage.matrix.matrix_generic_dense.Matrix_generic_dense'>



On Saturday, September 20, 2014 3:07:27 AM UTC+8, vdelecroix wrote:
>
> There is definitely something wrong, but what would you expect from the 
> command 
>
> sage: F[0] 
>
> Vincent 
>
> 2014-09-19 6:25 UTC+02:00, Michiel Kosters <[email protected] <javascript:>>: 
>
> > 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/site-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/site-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/site-packages/sage/repl/ipython_extension.pyc
>  
>
> >> 
> >> in runfile(self, s) 
> >> 
> >> 
> >> 
> >> 
> >> 
> /Applications/Sage-6.2.app/Contents/Resources/sage/local/lib/python2.7/site-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* 
> >> ... 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "sage-support" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to [email protected] <javascript:>. 
> > To post to this group, send email to [email protected] 
> <javascript:>. 
> > Visit this group at http://groups.google.com/group/sage-support. 
> > For more options, visit https://groups.google.com/d/optout. 
> > 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" 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-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to