[Numpy-tickets] [NumPy] #542: int division by zero gives wrong results
NumPy
numpy-tickets@scipy....
Wed Jun 27 19:03:51 CDT 2007
#542: int division by zero gives wrong results
------------------------+---------------------------------------------------
Reporter: chipschips | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: 1.0.4 Release
Component: Other | Version: none
Severity: normal | Keywords:
------------------------+---------------------------------------------------
integer division by zero returns 0 rather then inf (or some other
specially defined integer infinity constant). This behavior is not
consistent with floats and is mathematically wrong.
Example:
>>> 1/int_(0)
0
>>> 1/float_(0)
inf
Is this a bug or there is some good reason why ints behave this way?
I'm using numpy 1.0.1 and scipy 0.5.2
--
Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/542>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.
More information about the Numpy-tickets
mailing list