1ISGREATER(3)               Linux Programmer's Manual              ISGREATER(3)
2
3
4

NAME

6       isgreater,  isgreaterequal, isless, islessgreater, isunordered - macros
7       to test a relation
8

SYNOPSIS

10       #include <math.h>
11
12       int isgreater(x,y);
13
14       int isgreaterequal(x,y);
15
16       int isless(x,y);
17
18       int islessequal(x,y);
19
20       int islessgreater(x,y);
21
22       int isunordered(x,y);
23
24       Compile with -std=c99; link with -lm.
25

DESCRIPTION

27       The normal relation operations (like less) will fail if one of the  op‐
28       erands is NaN. This will cause an exception. To avoid this, C99 defines
29       these macros. The macros are guaranteed to evaluate their operands only
30       once.  The operand can be of any real floating-point type.
31
32       isgreater()
33              determines (x) > (y) without an exception if x or y is NaN.
34
35       isgreaterequal()
36              determines (x) >= (y) without an exception if x or y is NaN.
37
38       isless()
39              determines (x) < (y) without an exception if x or y is NaN.
40
41       islessequal()
42              determines (x) <= (y) without an exception if x or y is NaN.
43
44       islessgreater()
45              determines (x) < (y) || (x) > (y) without an exception if x or y
46              is NaN.  This macro is not equivalent to x  !=  y  because  that
47              expression is true if x or y is NaN.
48
49       isunordered()
50              is true if x or y is NaN and false otherwise.
51

NOTE

53       Not  all  hardware supports these functions, and where it doesn't, they
54       will be emulated by macros. This will give you a  performance  penalty.
55       Don't use these functions if NaN is of no concern for you.
56

CONFORMING TO

58       C99
59

SEE ALSO

61       fpclassify(3), isnan(3)
62
63
64
65                                  2002-07-27                      ISGREATER(3)
Impressum