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

Matthieu Brucher matthieu.brucher at gmail.com
Wed Mar 23 14:05:32 EDT 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 at ukr.net>

>  >>> 2**64
> 18446744073709551616L
> >>> 2**array(64)
> -9223372036854775808
> >>> 2**100
> 1267650600228229401496703205376L
> >>> 2**array(100)
> -9223372036854775808
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at 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.python.org/pipermail/numpy-discussion/attachments/20110323/7e1a7dba/attachment.html>


More information about the NumPy-Discussion mailing list