From: Ertugrul Soeylemez <never@drwxr-xr-x.org>
To: gentoo-science@lists.gentoo.org
Subject: Re: [gentoo-science] question about signbit
Date: Sun, 23 Oct 2005 08:39:18 +0200 [thread overview]
Message-ID: <20051023083918.6ca09df5@kill.mine.nu> (raw)
In-Reply-To: <200510221416.03348.dd55@cornell.edu>
[-- Attachment #1: Type: text/plain, Size: 1669 bytes --]
Darren Dale <dd55@cornell.edu> (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).
Regards.
-----
Get my public key via GnuPG with one of:
gpg --keyserver subkeys.pgp.net --recv-keys CE402012
gpg --keyserver ldap://keyserver.pgp.com/ --recv-keys CE402012
Or via web-based keyserver:
http://www.keyserver.de/
Key fingerprint:
0F12 0912 DFC8 2FC5 E2B8 A23E 6BAC 998E CE40 2012
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
prev parent reply other threads:[~2005-10-24 7:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-22 18:16 [gentoo-science] question about signbit Darren Dale
2005-10-22 21:05 ` Marco Matthies
2005-10-22 21:32 ` Darren Dale
2005-10-22 21:39 ` Marco Matthies
2005-10-27 12:52 ` Darren Dale
2005-10-27 14:24 ` Miguel Barao
2005-10-28 0:27 ` Ertugrul Soeylemez
2005-10-28 15:40 ` Marco Matthies
2005-10-28 16:00 ` Darren Dale
2005-10-23 6:39 ` Ertugrul Soeylemez [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051023083918.6ca09df5@kill.mine.nu \
--to=never@drwxr-xr-x.org \
--cc=gentoo-science@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox