1islessgreater(3M) Mathematical Library Functions islessgreater(3M)
2
3
4
6 islessgreater - test if x is less than or greater than y
7
9 c99 [ flag... ] file... -lm [ library... ]
10 #include <math.h>
11
12 int islessgreater(real-floating x, real-floating y);
13
14
16 The islessgreater() macro determines whether its first argument is less
17 than or greater than its second argument. The islessgreater(x, y) macro
18 is similar to (x) < (y) || (x) > (y); however, islessgreater(x, y) does
19 not raise the invalid floating-point exception when x and y are
20 unordered (nor does it evaluate x and y twice).
21
23 Upon successful completion, the islessgreater() macro returns the value
24 of (x) < (y) || (x) > (y).
25
26
27 If x or y is NaN, 0 is returned.
28
30 No errors are defined.
31
33 The relational and equality operators support the usual mathematical
34 relationships between numeric values. For any ordered pair of numeric
35 values, exactly one of the relationships (less, greater, and equal) is
36 true. Relational operators can raise the invalid floating-point excep‐
37 tion when argument values are NaNs. For a NaN and a numeric value, or
38 for two NaNs, just the unordered relationship is true. This macro is a
39 quiet (non-floating-point exception raising) version of a relational
40 operator. It facilitates writing efficient code that accounts for quiet
41 NaNs without suffering the invalid floating-point exception. In the
42 SYNOPSIS section, real-floating indicates that the argument is an
43 expression of real-floating type.
44
46 See attributes(5) for descriptions of the following attributes:
47
48
49
50
51 ┌─────────────────────────────┬─────────────────────────────┐
52 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
53 ├─────────────────────────────┼─────────────────────────────┤
54 │Interface Stability │Standard │
55 ├─────────────────────────────┼─────────────────────────────┤
56 │MT-Level │MT-Safe │
57 └─────────────────────────────┴─────────────────────────────┘
58
60 isgreater(3M), isgreaterequal(3M), isless(3M), islessequal(3M),
61 isunordered(3M), math.h(3HEAD), attributes(5), standards(5)
62
63
64
65SunOS 5.11 12 Jul 2006 islessgreater(3M)