1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2 .\" Distributed under GPL
3 .\" Based on glibc infopages
4 .TH SIGNBIT 3 2002-08-10 "GNU" "libc math functions"
6 signbit \- test sign of a real floating point number
10 .BI "int signbit (" X ");"
12 Compile with -std=c99; link with \-lm.
14 `signbit' is a generic macro which can work on all real floating-point
15 types. It returns a nonzero value if the value of X has its sign
18 This is not the same as `x < 0.0', because IEEE 754 floating point
19 allows zero to be signed. The comparison `-0.0 < 0.0' is false,
20 but `signbit (-0.0)' will return a nonzero value.
22 This function is defined in IEC 559 (and the appendix with
23 recommended functions in IEEE 754/IEEE 854).