thouis / numpy-trac-migration

numpy Trac to github issues migration
2 stars 3 forks source link

__int__() segfaults for float128 (Trac #2173) #5963

Open numpy-gitbot opened 12 years ago

numpy-gitbot commented 12 years ago

Original ticket http://projects.scipy.org/numpy/ticket/2173 on 2012-06-19 by trac user edcjones, assigned to unknown.

I use up-to-date Debian testing (wheezy) linux, amd64 architecture. I have installed packages python3.2, version 3.2.3~rc2-1 and python3-numpy, version 1:1.6.2-1.

I got the same answers with packages python2.7, version 2.7.3~rc2-2.1, and python-numpy, version 1:1.6.2-1.

The second line causes a segmentation fault:

M = numpy.finfo(numpy.float128).max

i = M.int()

numpy-gitbot commented 12 years ago

Attachment added by trac user edcjones on 2012-06-19: z17.py

numpy-gitbot commented 12 years ago

trac user edcjones wrote on 2012-06-20

Also

M = numpy.finfo(numpy.float128).max

i = int(M)

raises "OverflowError: cannot convert float infinity to integer".