[Numpy-discussion] isinf raises in inf

Charles R Harris charlesr.harris@gmail....
Thu Jul 15 20:09:15 CDT 2010

On Thu, Jul 15, 2010 at 6:55 PM, Charles R Harris <charlesr.harris@gmail.com
> wrote:

> On Thu, Jul 15, 2010 at 6:42 PM, John Hunter <jdh2358@gmail.com> wrote:
>> On Thu, Jul 15, 2010 at 7:27 PM, Charles R Harris
>> <charlesr.harris@gmail.com> wrote:
>> >
>> >
>> > On Thu, Jul 15, 2010 at 6:11 PM, John Hunter <jdh2358@gmail.com> wrote:
>> >>
>> >> On Thu, Jul 15, 2010 at 6:14 PM, Eric Firing <efiring@hawaii.edu>
>> wrote:
>> >> > Is it certain that the Solaris compiler lacks isinf?  Is it possible
>> >> > that it has it, but it is not being detected?
>> >>
>> >> Just to clarify, I'm not using the sun compiler, but gcc-3.4.3 on
>> solaris
>> >> x86
>> >
>> > Might be related to this thread.  What version of numpy are you using?
>> svn HEAD (2.0.0.dev8480)
>> After reading the thread you suggested, I tried forcing the
>> flag to be set, but this is apparently a bad idea for my platform...
>>  File
>> "/home/titan/johnh/dev/lib/python2.4/site-packages/numpy/core/__init__.py",
>> line 5, in ?
>>    import multiarray
>> ImportError: ld.so.1: python: fatal: relocation error: file
>> /home/titan/johnh/dev/lib/python2.4/site-packages/numpy/core/multiarray.so:
>> symbol isfinite: referenced symbol not found
>> so while I think my bug is related to that thread, I don't see
>> anything in that thread to help me fix my problem.  Or am I missing
>> something?
>> ____
> In the thread there is a way to check if isinf is in the library. You can
> also grep through the python include files where its presence should be set,
> that's in /usr/include/python2.6/pyconfig.h on my system. If it's present,
> then you should be able to apply David's fix<http://projects.scipy.org/numpy/changeset/8455>which amount to just a few lines.
PS, of course we should fix the macro also. Since the bit values of +/-
infinity are known we should be able to define them as constants using a
couple of ifdefs and unions. I believe SUN has quad precision so we might
need to check the layout, but the usual case seems to be zero mantissa,
maximum exponent, and the sign. Not a number differs in that the mantissa is
non-zero. I believe there are two versions of nans, signaling and
non-signaling, but in any case it doesn't look to me like it should be
impossible to simply have all those values as numpy constants like pi and e.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20100715/2e1d5ddf/attachment.html 

More information about the NumPy-Discussion mailing list