1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
3 .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
4 .\" Distributed under GPL
7 .\" 2002-07-27 Walter Harms
8 .\" this was done with the help of the glibc manual
10 .TH ISGREATER 3 2017-09-15 "" "Linux Programmer's Manual"
12 isgreater, isgreaterequal, isless, islessequal, islessgreater,
13 isunordered \- floating-point relational tests without exception for NaN
18 .BI "int isgreater(" x ", " y );
19 .BI "int isgreaterequal(" x ", " y );
20 .BI "int isless(" x ", " y );
21 .BI "int islessequal(" x ", " y );
22 .BI "int islessgreater(" x ", " y );
23 .BI "int isunordered(" x ", " y );
29 Feature Test Macro Requirements for glibc (see
30 .BR feature_test_macros (7)):
34 All functions described here:
35 _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
38 The normal relational operations (like
41 fail if one of the operands is NaN.
42 This will cause an exception.
43 To avoid this, C99 defines the macros listed below.
45 These macros are guaranteed to evaluate their arguments only once.
46 The arguments must be of real floating-point type (note: do not pass
47 integer values as arguments to these macros, since the arguments will
49 be promoted to real-floating types).
52 determines \fI(x)\ >\ (y)\fP without an exception
60 determines \fI(x)\ >=\ (y)\fP without an exception
68 determines \fI(x)\ <\ (y)\fP without an exception
76 determines \fI(x)\ <=\ (y)\fP without an exception
84 determines \fI(x)\ < (y) || (x) >\ (y)\fP
85 without an exception if
90 This macro is not equivalent to \fIx\ !=\ y\fP because that expression is
98 determines whether its arguments are unordered, that is, whether
99 at least one of the arguments is a NaN.
101 The macros other than
103 return the result of the relational comparison;
104 these macros return 0 if either argument is a NaN.
111 is NaN and 0 otherwise.
115 For an explanation of the terms used in this section, see
123 Interface Attribute Value
126 .BR isgreaterequal (),
129 .BR islessgreater (),
131 T} Thread safety MT-Safe
137 POSIX.1-2001, POSIX.1-2008, C99.
139 Not all hardware supports these functions,
140 and where hardware support isn't provided, they will be emulated by macros.
141 This will result in a performance penalty.
142 Don't use these functions if NaN is of no concern for you.