[NumPy-Tickets] [NumPy] #1940: uint64 modulo arithmetic broken
NumPy Trac
numpy-tickets@scipy....
Mon Aug 22 09:43:39 CDT 2011
#1940: uint64 modulo arithmetic broken
----------------------+-----------------------------------------------------
Reporter: AngerMCS | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: Unscheduled
Component: Other | Version: 1.6.0
Keywords: |
----------------------+-----------------------------------------------------
Running numpy 1.6.0 on python 3.2.1 both compiled from source.
uint64(-1)%2 is returning 0.0 which is obviously incorrect.
Also when using uint64, modulo is returning a a float64 which is illogical
since it can never return anything other than a uint64.
Python 3.2.1 (default, Jul 20 2011, 15:59:19)
[GCC 4.3.2 20081105 (Red Hat 4.3.2-7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from numpy import uint64
>>> uint64(-1)
18446744073709551615
>>> a = uint64(-1)
>>> a
18446744073709551615
>>> hex(a)
'0xffffffffffffffff'
>>> a%2
0.0
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/1940>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list