[Numpy-discussion] bug with numpy 2 ** N

Matthieu Brucher matthieu.brucher@gmail....
Wed Mar 23 13:05:32 CDT 2011


Hi,

I don't thnk this is a bug. You are playign with C integers, not Python
integers, and the former are limited. It's a common "feature" in all
processors (even DSPs).

Matthieu

2011/3/23 Dmitrey <tmp50@ukr.net>

>  >>> 2**64
> 18446744073709551616L
> >>> 2**array(64)
> -9223372036854775808
> >>> 2**100
> 1267650600228229401496703205376L
> >>> 2**array(100)
> -9223372036854775808
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>


-- 
Information System Engineer, Ph.D.
Blog: http://matt.eifelle.com
LinkedIn: http://www.linkedin.com/in/matthieubrucher
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20110323/7e1a7dba/attachment.html 


More information about the NumPy-Discussion mailing list