Determine whether a floating-point number is negative
#include <math.h> #define signbit( x ) ...
The signbit() macro determine whether the given floating-point number is negative. Note that NaNs, zeroes, and infinities have a sign bit.
Nonzero if the given number is negative.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | No |
Thread | Yes |