]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/isgreater.3
Added "Compile with -std=c99" as suggested by Fabian Kreutz
[thirdparty/man-pages.git] / man3 / isgreater.3
1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2 .\" Distributed under GPL
3 .\" 2002-07-27 Walter Harms
4 .\" this was done with the help of the glibc manual
5 .\"
6 .TH ISGREATER 3 2002-07-27 "" "Linux Programmer's Manual"
7 .SH NAME
8 isgreater, isgreaterequal, isless, islessgreater, isunordered \- macros
9 to test a relation
10 .SH SYNOPSIS
11 .nf
12 .B #include <math.h>
13 .sp
14 .BI "int isgreater(x,y);
15 .sp
16 .BI "int isgreaterequal(x,y);
17 .sp
18 .BI "int isless(x,y);
19 .sp
20 .BI "int islessequal(x,y);
21 .sp
22 .BI "int islessgreater(x,y);
23 .sp
24 .BI "int isunordered(x,y);
25 .fi
26 .sp
27 Compile with -std=c99; link with \-lm.
28 .SH DESCRIPTION
29 The normal relation operations (like less) will fail if one of the
30 operands is NaN. This will cause an exception. To avoid this, C99 defines
31 these macros. The macros are guaranteed to evaluate their operands only once.
32 The operand can be of any real floating-point type.
33 .TP
34 isgreater()
35 determines (x) > (y) without an exception if x or y is NaN.
36 .TP
37 isgreaterequal()
38 determines (x) >= (y) without an exception if x or y is NaN.
39 .TP
40 isless()
41 determines (x) < (y) without an exception if x or y is NaN.
42 .TP
43 islessequal()
44 determines (x) <= (y) without an exception if x or y is NaN.
45 .TP
46 islessgreater()
47 determines (x) < (y) || (x) > (y) without an exception if x or y is NaN.
48 This macro is not equivalent to x != y because that expression is
49 true if x or y is NaN.
50 .TP
51 isunordered()
52 is true if x or y is NaN and false otherwise.
53 .SH NOTE
54 Not all hardware supports these functions, and where it doesn't, they
55 will be emulated by macros. This will give you a performance penalty.
56 Don't use these functions if NaN is of no concern for you.
57 .SH "CONFORMING TO"
58 C99
59 .SH "SEE ALSO"
60 .BR fpclassify (3)
61 .BR isnan (3)