Gentoo Logo
Gentoo Spaceship

Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-science
Lists: gentoo-science: < Prev By Thread Next > < Prev By Date Next >
To: gentoo-science@g.o
From: Ertugrul Soeylemez <never@...>
Subject: Re: question about signbit
Date: Sun, 23 Oct 2005 08:39:18 +0200
Darren Dale <dd55@...> (Sat, 22 Oct 2005 14:16:02 -0400):
> I am trying to track down the source of a bug in the SciPy development branch
> which, so far, has only been reported on a Gentoo platform (mine). It
> involves the use of the libc math function "signbit". Here is a clip from the
> manpage:
>        `signbit' is a generic macro which can work on all real floating-
>        point types.  It returns a non-zero value if the value of  X  has
>        its sign bit set.
> On my system, SciPy's signbit function reports that the sign bit is not set
> for any number, positive or negative. Could someone here help me understand
> how to test the libc signbit function? I have to admit I have no experience
> with C programming.

Hello Darren,

This doesn't have to be a bug.  I don't know how SciPy works, but many
scientific libraries provide their own number types.  In most number
encoding schemes (like floating point) the sign of a number is
determined by a single bit (the most significant bit of the whole
number, for integer types; the most significant bit of the mantissa, for
floating point types).

The scheme could be totally different for SciPy, so the bit actually
reported might be the wrong bit.  This is not a bug, but rather a
missing feature (signbit() doesn't know the type of the number).


Get my public key via GnuPG with one of:
gpg --keyserver --recv-keys CE402012
gpg --keyserver ldap:// --recv-keys CE402012

Or via web-based keyserver:

Key fingerprint:
0F12 0912 DFC8 2FC5 E2B8  A23E 6BAC 998E CE40 2012
pgp5ehOOSwOeB.pgp (PGP signature)
question about signbit
-- Darren Dale
Lists: gentoo-science: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: question about signbit
Next by thread:
Can't Start Ocatave
Previous by date:
Re: question about signbit
Next by date:
Re: question about signbit

Updated Jun 17, 2009

Summary: Archive of the gentoo-science mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.