Chapter Contents

Previous

Next
signbit

signbit



Test sign of floating-point number

Portability: C99


SYNOPSIS
DESCRIPTION
RETURN VALUE
RELATED FUNCTIONS
SEE ALSO


SYNOPSIS

   #include <math.h>

   int signbit(floating x);


DESCRIPTION

signbit determines whether its argument is positive or negative by testing the sign bit. Note that zeroes and NaNs may have the sign bit set.


RETURN VALUE

signbit returns 0 if its argument is positive (the sign bit is off), or non-zero if its argument is negative (the sign bit is on).


RELATED FUNCTIONS

copysign


SEE ALSO

"Mathematical Functions" in Chapter 2, "Function Categories"


Chapter Contents

Previous

Next

Top of Page

Copyright © 2004 by SAS Institute Inc., Cary, NC, USA. All rights reserved.