[SciPy-dev] signbit and -inf
Travis Oliphant
oliphant at ee.byu.edu
Wed Oct 19 12:53:03 CDT 2005
Darren Dale wrote:
>>I can run the full test without a segfault, although I am only using the
>>newcore (I get a segfault when I install newscipy and try to import scipy).
>>I am using Gentoo on a Pentium4, with Python-2.4.2 and gcc-3.4.4. I built
>>scipy against BLAS/LAPACK/ATLAS using the same site.cfg as I used to build
>>scipy-0.3.2. It turns out that on my machine, signbit returns False for any
>>negative number, not just -inf.
>>
>>
>
>Does anyone have any suggestions as to how I can pursue this?
>
>
>
Look at the config.h file in the scipy include directory (under
site-packages/scipy/base/include)
The code for signbit is from cephes and is in
scipy/base/src/_signbit.c It is pretty simple but depends on certain
platform characteristics.
The important questions are
is WORDS_BIGENDIAN defined in pyconfig.h (in include/pythonX.X) and what
is the SIZEOF integer on your platform.
For your system, I would expect SIZEOF_INT to be 4 (look in config.h)
and WORDS_BIGENDIAN to not be defined.
-Travis
More information about the Scipy-dev
mailing list