]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/signbit.3
Global edit: s/nonzero/non-zero/
[thirdparty/man-pages.git] / man3 / signbit.3
CommitLineData
fea681da
MK
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"
5.SH NAME
6signbit \- test sign of a real floating point number
7.SH SYNOPSIS
8.B "#include <math.h>"
9.sp
10.BI "int signbit (" X ");"
11.sp
462a7bad 12Compile with -std=c99; link with \-lm.
fea681da
MK
13.SH DESCRIPTION
14`signbit' is a generic macro which can work on all real floating-point
f59a3f19 15types. It returns a non-zero value if the value of X has its sign
fea681da
MK
16bit set.
17.PP
18This is not the same as `x < 0.0', because IEEE 754 floating point
19allows zero to be signed. The comparison `-0.0 < 0.0' is false,
f59a3f19 20but `signbit (-0.0)' will return a non-zero value.
fea681da
MK
21.SH "CONFORMING TO"
22This function is defined in IEC 559 (and the appendix with
23recommended functions in IEEE 754/IEEE 854).
24.SH "SEE ALSO"
25.BR copysign (3)