[issue12589] test_long.test_nan_inf() failed on OpenBSD (powerpc)

STINNER Victor report at bugs.python.org
Fri Jul 22 01:29:12 CEST 2011


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

You may try:

$ ./python
>>> import ctypes
>>> import ctypes.util
>>> libc = ctypes.cdll.LoadLibrary(ctypes.util.find_library('c'))
>>> isinf = libc.isinf
>>> isinf.argtypes = (ctypes.c_double,)
>>> isinf(0.0)
0
>>> isinf(float('inf'))
1

(try ctypes.util.find_library('m') if isinf is not in libc)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12589>
_______________________________________


More information about the Python-bugs-list mailing list