Gentoo Archives: gentoo-science

From: Darren Dale <dd55@×××××××.edu>
To: gentoo-science@l.g.o
Subject: Re: [gentoo-science] question about signbit
Date: Fri, 28 Oct 2005 16:01:15
Message-Id: 200510281200.05694.dd55@cornell.edu
In Reply to: Re: [gentoo-science] question about signbit by Marco Matthies
1 On Friday 28 October 2005 11:40 am, Marco Matthies wrote:
2 > Darren Dale wrote:
3 > > signbit(-1): -2147483648
4 > > isnan(0.0/0): 1
5 > > isinf(1.0/0): 1
6 >
7 > As other people have already noted, signbit from math.h is behaving as
8 > it should.
9 >
10 > > Do you know why signbit doesn't yield 1? I wonder if this might be the
11 > > source of the problem in Scipy.
12 >
13 > I actually had a look at scipy today, and it uses its own signbit
14 > routine -- so looking at what signbit from math.h does is totally
15 > irrelevant. The scipy signbit implementation does say it returns 0 or 1.
16
17 Actually, SciPy's signbit is only used if math.h does not supply it. On my
18 system, the math.h version of signbit is used. I talked with the lead scipy
19 developer this morning, and based on the fact that signbit was returning a
20 nonzero result rather than 1, he made a modification to scipy's code and we
21 got the problem solved. Thank you everyone for your help. All of Scipy's
22 tests are now successful on my arch, I think they will have a test release
23 coming in the not-too-distant future.
24
25 Darren
26 --
27 gentoo-science@g.o mailing list