1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2 .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
3 .\" <mtk.manpages@gmail.com>
5 .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
6 .\" Distributed under GPL
9 .\" Based on glibc infopages, copyright Free Software Foundation
11 .TH SIGNBIT 3 2017-09-15 "GNU" "Linux Programmer's Manual"
13 signbit \- test sign of a real floating-point number
15 .B "#include <math.h>"
17 .BI "int signbit(" x ");"
22 Feature Test Macro Requirements for glibc (see
23 .BR feature_test_macros (7)):
29 _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
34 is a generic macro which can work on all real floating-point types.
35 It returns a nonzero value if the value of
39 This is not the same as
41 because IEEE 754 floating point allows zero to be signed.
46 will return a nonzero value.
48 NaNs and infinities have a sign bit.
52 macro returns nonzero if the sign of
54 is negative; otherwise it returns zero.
58 For an explanation of the terms used in this section, see
64 Interface Attribute Value
67 T} Thread safety MT-Safe
70 POSIX.1-2001, POSIX.1-2008, C99.
71 This function is defined in IEC 559 (and the appendix with
72 recommended functions in IEEE 754/IEEE 854).