Name
signbit
- test sign of a real floating point number
Library
libm.lib
Synopsis
|
int
signbit (real-floating x);
|
Detailed description
The
signbit
macro takes an argument of
x
and returns non-zero if the value of its sign is negative, otherwise 0.
Examples
#include <math.h>
int main( )
{
double x1 = 0.0, x2 = -4.0 ;
int y;
y = signbit( x1);
printf( "signbit( %f) = %d\n", x1, y );
y = signbit( x2);
printf( "signbit( %f) = %d\n", x2, y );
}
Output
signbit ( 0.0 ) = 0
signbit( -4.0 ) = 1
See also
fpclassify,
math
Feedback
For additional information or queries on this page send feedback
© 2008 Nokia Corporation. All rights reserved. This documentation can be used in the connection with this Product to help and support the user. |
|