From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.50) id 1ETQyi-0000on-N5 for garchives@archives.gentoo.org; Sat, 22 Oct 2005 21:32:37 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.5/8.13.5) with SMTP id j9MLTbI0017336; Sat, 22 Oct 2005 21:29:37 GMT Received: from authusersmtp.mail.cornell.edu (granite1.mail.cornell.edu [128.253.83.141]) by robin.gentoo.org (8.13.5/8.13.5) with ESMTP id j9MLTacC030077 for ; Sat, 22 Oct 2005 21:29:36 GMT Received: from leibniz.ether (user-10mt4mi.cable.mindspring.com [65.110.146.210]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.13.1/8.12.10) with ESMTP id j9MLWYr1026930 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for ; Sat, 22 Oct 2005 17:32:35 -0400 (EDT) From: Darren Dale To: gentoo-science@lists.gentoo.org Subject: Re: [gentoo-science] question about signbit Date: Sat, 22 Oct 2005 17:32:33 -0400 User-Agent: KMail/1.8.3 References: <200510221416.03348.dd55@cornell.edu> <435AA97C.7020103@gmx.net> In-Reply-To: <435AA97C.7020103@gmx.net> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-science@gentoo.org Reply-to: gentoo-science@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200510221732.34058.dd55@cornell.edu> X-Archives-Salt: 3632b829-0475-4a37-a613-089bf20bcbf5 X-Archives-Hash: c45b79342c19842b003704f844cf1262 On Saturday 22 October 2005 5:05 pm, Marco Matthies wrote: > Darren Dale wrote: > > 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. > > Hi Darren, > > the signbit fuction is actually a macro (as the manpage says) defined in > math.h that in turn calls the right inline function (for the type > needed) which is defined in mathinline.h --- so as far as i can see, > libc should not be involved, only header files. I have attached a small > example below on how to use the function. Please note the use of > -std=c99 (you may also use -std=gnu99) as the macro is only activated > when in C99 mode and gcc's default mode is C89 ("ANSI C"). If you're > interested in the differences between the two standards the wikipedia > entry on c has some info: > http://en.wikipedia.org/wiki/C_programming_language Hi Marko, Thank you for your thoughtful and informative response. I have learned a few things. Your test shows that signbit is working just fine on my system. I will discuss my results with the SciPy folks. Thanks again, Darren -- gentoo-science@gentoo.org mailing list