Gentoo Archives: gentoo-science

From: Darren Dale <dd55@×××××××.edu>
To: gentoo-science@l.g.o
Subject: Re: [gentoo-science] question about signbit
Date: Sat, 22 Oct 2005 21:32:37
In Reply to: Re: [gentoo-science] question about signbit by Marco Matthies
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: >
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@g.o mailing list