signbit()

Determine whether a floating-point number is negative

Synopsis:

#include <math.h>

#define signbit( x ) ...

Arguments:

x
A floating-point value.

Library:

libm

Use the -l m option to qcc to link against this library.

Description:

The signbit() macro determines whether the given floating-point number is negative. The sign bit is set for negative numbers, including negative NaN, negative zero, and negative infinity.

Returns:

Nonzero if the given number is negative.

Classification:

ANSI, POSIX 1003.1

Safety:  
Cancellation point No
Interrupt handler No
Signal handler No
Thread Yes