]>
Commit | Line | Data |
---|---|---|
5cbb5849 | 1 | /* Test totalordermag. |
dff8da6b | 2 | Copyright (C) 1997-2024 Free Software Foundation, Inc. |
5cbb5849 JM |
3 | This file is part of the GNU C Library. |
4 | ||
5 | The GNU C Library is free software; you can redistribute it and/or | |
6 | modify it under the terms of the GNU Lesser General Public | |
7 | License as published by the Free Software Foundation; either | |
8 | version 2.1 of the License, or (at your option) any later version. | |
9 | ||
10 | The GNU C Library is distributed in the hope that it will be useful, | |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 | Lesser General Public License for more details. | |
14 | ||
15 | You should have received a copy of the GNU Lesser General Public | |
16 | License along with the GNU C Library; if not, see | |
5a82c748 | 17 | <https://www.gnu.org/licenses/>. */ |
5cbb5849 | 18 | |
92061bb0 JM |
19 | #include "libm-test-driver.c" |
20 | ||
5cbb5849 JM |
21 | static const struct test_ff_i_data totalordermag_test_data[] = |
22 | { | |
42760d76 JM |
23 | TEST_fpfp_b (totalordermag, minus_zero, minus_zero, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), |
24 | TEST_fpfp_b (totalordermag, minus_zero, plus_zero, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
25 | TEST_fpfp_b (totalordermag, minus_zero, 1, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
26 | TEST_fpfp_b (totalordermag, minus_zero, minus_infty, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
27 | TEST_fpfp_b (totalordermag, minus_zero, plus_infty, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
28 | TEST_fpfp_b (totalordermag, minus_zero, qnan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
29 | TEST_fpfp_b (totalordermag, minus_zero, -qnan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
30 | TEST_fpfp_b (totalordermag, minus_zero, snan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
31 | TEST_fpfp_b (totalordermag, minus_zero, -snan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
32 | TEST_fpfp_b (totalordermag, plus_zero, minus_zero, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
33 | TEST_fpfp_b (totalordermag, plus_zero, plus_zero, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
34 | TEST_fpfp_b (totalordermag, plus_zero, 1, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
35 | TEST_fpfp_b (totalordermag, plus_zero, minus_infty, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
36 | TEST_fpfp_b (totalordermag, plus_zero, plus_infty, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
37 | TEST_fpfp_b (totalordermag, plus_zero, qnan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
38 | TEST_fpfp_b (totalordermag, plus_zero, -qnan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
39 | TEST_fpfp_b (totalordermag, plus_zero, snan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
40 | TEST_fpfp_b (totalordermag, plus_zero, -snan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
41 | TEST_fpfp_b (totalordermag, 1, minus_zero, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
42 | TEST_fpfp_b (totalordermag, 1, plus_zero, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
43 | TEST_fpfp_b (totalordermag, 1, 1, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
44 | TEST_fpfp_b (totalordermag, 1, minus_infty, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
45 | TEST_fpfp_b (totalordermag, 1, plus_infty, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
46 | TEST_fpfp_b (totalordermag, 1, qnan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
47 | TEST_fpfp_b (totalordermag, 1, -qnan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
48 | TEST_fpfp_b (totalordermag, 1, snan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
49 | TEST_fpfp_b (totalordermag, 1, -snan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
50 | TEST_fpfp_b (totalordermag, minus_infty, minus_zero, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
51 | TEST_fpfp_b (totalordermag, minus_infty, plus_zero, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
52 | TEST_fpfp_b (totalordermag, minus_infty, 1, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
53 | TEST_fpfp_b (totalordermag, minus_infty, minus_infty, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
54 | TEST_fpfp_b (totalordermag, minus_infty, plus_infty, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
55 | TEST_fpfp_b (totalordermag, minus_infty, qnan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
56 | TEST_fpfp_b (totalordermag, minus_infty, -qnan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
57 | TEST_fpfp_b (totalordermag, minus_infty, snan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
58 | TEST_fpfp_b (totalordermag, minus_infty, -snan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
59 | TEST_fpfp_b (totalordermag, plus_infty, minus_zero, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
60 | TEST_fpfp_b (totalordermag, plus_infty, plus_zero, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
61 | TEST_fpfp_b (totalordermag, plus_infty, 1, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
62 | TEST_fpfp_b (totalordermag, plus_infty, minus_infty, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
63 | TEST_fpfp_b (totalordermag, plus_infty, plus_infty, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
64 | TEST_fpfp_b (totalordermag, plus_infty, qnan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
65 | TEST_fpfp_b (totalordermag, plus_infty, -qnan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
66 | TEST_fpfp_b (totalordermag, plus_infty, snan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
67 | TEST_fpfp_b (totalordermag, plus_infty, -snan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
68 | TEST_fpfp_b (totalordermag, qnan_value, minus_zero, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
69 | TEST_fpfp_b (totalordermag, -qnan_value, minus_zero, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
70 | TEST_fpfp_b (totalordermag, qnan_value, plus_zero, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
71 | TEST_fpfp_b (totalordermag, -qnan_value, plus_zero, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
72 | TEST_fpfp_b (totalordermag, qnan_value, 1, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
73 | TEST_fpfp_b (totalordermag, -qnan_value, 1, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
74 | TEST_fpfp_b (totalordermag, qnan_value, minus_infty, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
75 | TEST_fpfp_b (totalordermag, -qnan_value, minus_infty, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
76 | TEST_fpfp_b (totalordermag, qnan_value, plus_infty, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
77 | TEST_fpfp_b (totalordermag, -qnan_value, plus_infty, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
78 | TEST_fpfp_b (totalordermag, snan_value, minus_zero, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
79 | TEST_fpfp_b (totalordermag, -snan_value, minus_zero, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
80 | TEST_fpfp_b (totalordermag, snan_value, plus_zero, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
81 | TEST_fpfp_b (totalordermag, -snan_value, plus_zero, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
82 | TEST_fpfp_b (totalordermag, snan_value, 1, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
83 | TEST_fpfp_b (totalordermag, -snan_value, 1, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
84 | TEST_fpfp_b (totalordermag, snan_value, minus_infty, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
85 | TEST_fpfp_b (totalordermag, -snan_value, minus_infty, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
86 | TEST_fpfp_b (totalordermag, snan_value, plus_infty, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
87 | TEST_fpfp_b (totalordermag, -snan_value, plus_infty, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
88 | TEST_fpfp_b (totalordermag, qnan_value, qnan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
89 | TEST_fpfp_b (totalordermag, qnan_value, -qnan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
90 | TEST_fpfp_b (totalordermag, -qnan_value, qnan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
91 | TEST_fpfp_b (totalordermag, -qnan_value, -qnan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
92 | TEST_fpfp_b (totalordermag, snan_value, qnan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
93 | TEST_fpfp_b (totalordermag, snan_value, -qnan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
94 | TEST_fpfp_b (totalordermag, -snan_value, qnan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
95 | TEST_fpfp_b (totalordermag, -snan_value, -qnan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
96 | TEST_fpfp_b (totalordermag, qnan_value, snan_value, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
97 | TEST_fpfp_b (totalordermag, qnan_value, -snan_value, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
98 | TEST_fpfp_b (totalordermag, -qnan_value, snan_value, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
99 | TEST_fpfp_b (totalordermag, -qnan_value, -snan_value, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
100 | TEST_fpfp_b (totalordermag, snan_value, snan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
101 | TEST_fpfp_b (totalordermag, snan_value, -snan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
102 | TEST_fpfp_b (totalordermag, -snan_value, snan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
103 | TEST_fpfp_b (totalordermag, -snan_value, -snan_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
104 | TEST_fpfp_b (totalordermag, minus_zero, -min_subnorm_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
105 | TEST_fpfp_b (totalordermag, minus_zero, min_subnorm_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
106 | TEST_fpfp_b (totalordermag, plus_zero, -min_subnorm_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
107 | TEST_fpfp_b (totalordermag, plus_zero, min_subnorm_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
108 | TEST_fpfp_b (totalordermag, -min_subnorm_value, minus_zero, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
109 | TEST_fpfp_b (totalordermag, -min_subnorm_value, plus_zero, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
110 | TEST_fpfp_b (totalordermag, min_subnorm_value, minus_zero, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
111 | TEST_fpfp_b (totalordermag, min_subnorm_value, plus_zero, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
112 | TEST_fpfp_b (totalordermag, min_value, max_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
113 | TEST_fpfp_b (totalordermag, min_value, -max_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
114 | TEST_fpfp_b (totalordermag, -min_value, max_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
115 | TEST_fpfp_b (totalordermag, -min_value, -max_value, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
116 | TEST_fpfp_b (totalordermag, max_value, min_value, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
117 | TEST_fpfp_b (totalordermag, max_value, -min_value, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
118 | TEST_fpfp_b (totalordermag, -max_value, min_value, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
119 | TEST_fpfp_b (totalordermag, -max_value, -min_value, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
120 | TEST_fpfp_b (totalordermag, qnan_value_pl ("0x1"), qnan_value_pl ("0x1"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
121 | TEST_fpfp_b (totalordermag, qnan_value_pl ("0x1"), qnan_value_pl ("0x2"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
122 | TEST_fpfp_b (totalordermag, qnan_value_pl ("0x1"), qnan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
123 | TEST_fpfp_b (totalordermag, qnan_value_pl ("0x2"), qnan_value_pl ("0x1"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
124 | TEST_fpfp_b (totalordermag, qnan_value_pl ("0x2"), qnan_value_pl ("0x2"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
125 | TEST_fpfp_b (totalordermag, qnan_value_pl ("0x2"), qnan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
126 | TEST_fpfp_b (totalordermag, qnan_value_pl ("0x3fffff"), qnan_value_pl ("0x1"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
127 | TEST_fpfp_b (totalordermag, qnan_value_pl ("0x3fffff"), qnan_value_pl ("0x2"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
128 | TEST_fpfp_b (totalordermag, qnan_value_pl ("0x3fffff"), qnan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
129 | TEST_fpfp_b (totalordermag, qnan_value_pl ("0x1"), -qnan_value_pl ("0x1"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
130 | TEST_fpfp_b (totalordermag, qnan_value_pl ("0x1"), -qnan_value_pl ("0x2"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
131 | TEST_fpfp_b (totalordermag, qnan_value_pl ("0x1"), -qnan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
132 | TEST_fpfp_b (totalordermag, qnan_value_pl ("0x2"), -qnan_value_pl ("0x1"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
133 | TEST_fpfp_b (totalordermag, qnan_value_pl ("0x2"), -qnan_value_pl ("0x2"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
134 | TEST_fpfp_b (totalordermag, qnan_value_pl ("0x2"), -qnan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
135 | TEST_fpfp_b (totalordermag, qnan_value_pl ("0x3fffff"), -qnan_value_pl ("0x1"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
136 | TEST_fpfp_b (totalordermag, qnan_value_pl ("0x3fffff"), -qnan_value_pl ("0x2"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
137 | TEST_fpfp_b (totalordermag, qnan_value_pl ("0x3fffff"), -qnan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
138 | TEST_fpfp_b (totalordermag, -qnan_value_pl ("0x1"), qnan_value_pl ("0x1"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
139 | TEST_fpfp_b (totalordermag, -qnan_value_pl ("0x1"), qnan_value_pl ("0x2"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
140 | TEST_fpfp_b (totalordermag, -qnan_value_pl ("0x1"), qnan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
141 | TEST_fpfp_b (totalordermag, -qnan_value_pl ("0x2"), qnan_value_pl ("0x1"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
142 | TEST_fpfp_b (totalordermag, -qnan_value_pl ("0x2"), qnan_value_pl ("0x2"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
143 | TEST_fpfp_b (totalordermag, -qnan_value_pl ("0x2"), qnan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
144 | TEST_fpfp_b (totalordermag, -qnan_value_pl ("0x3fffff"), qnan_value_pl ("0x1"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
145 | TEST_fpfp_b (totalordermag, -qnan_value_pl ("0x3fffff"), qnan_value_pl ("0x2"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
146 | TEST_fpfp_b (totalordermag, -qnan_value_pl ("0x3fffff"), qnan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
147 | TEST_fpfp_b (totalordermag, -qnan_value_pl ("0x1"), -qnan_value_pl ("0x1"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
148 | TEST_fpfp_b (totalordermag, -qnan_value_pl ("0x1"), -qnan_value_pl ("0x2"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
149 | TEST_fpfp_b (totalordermag, -qnan_value_pl ("0x1"), -qnan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
150 | TEST_fpfp_b (totalordermag, -qnan_value_pl ("0x2"), -qnan_value_pl ("0x1"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
151 | TEST_fpfp_b (totalordermag, -qnan_value_pl ("0x2"), -qnan_value_pl ("0x2"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
152 | TEST_fpfp_b (totalordermag, -qnan_value_pl ("0x2"), -qnan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
153 | TEST_fpfp_b (totalordermag, -qnan_value_pl ("0x3fffff"), -qnan_value_pl ("0x1"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
154 | TEST_fpfp_b (totalordermag, -qnan_value_pl ("0x3fffff"), -qnan_value_pl ("0x2"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
155 | TEST_fpfp_b (totalordermag, -qnan_value_pl ("0x3fffff"), -qnan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
156 | TEST_fpfp_b (totalordermag, snan_value_pl ("0x1"), snan_value_pl ("0x1"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
157 | TEST_fpfp_b (totalordermag, snan_value_pl ("0x1"), snan_value_pl ("0x2"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
158 | TEST_fpfp_b (totalordermag, snan_value_pl ("0x1"), snan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
159 | TEST_fpfp_b (totalordermag, snan_value_pl ("0x2"), snan_value_pl ("0x1"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
160 | TEST_fpfp_b (totalordermag, snan_value_pl ("0x2"), snan_value_pl ("0x2"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
161 | TEST_fpfp_b (totalordermag, snan_value_pl ("0x2"), snan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
162 | TEST_fpfp_b (totalordermag, snan_value_pl ("0x3fffff"), snan_value_pl ("0x1"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
163 | TEST_fpfp_b (totalordermag, snan_value_pl ("0x3fffff"), snan_value_pl ("0x2"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
164 | TEST_fpfp_b (totalordermag, snan_value_pl ("0x3fffff"), snan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
165 | TEST_fpfp_b (totalordermag, snan_value_pl ("0x1"), -snan_value_pl ("0x1"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
166 | TEST_fpfp_b (totalordermag, snan_value_pl ("0x1"), -snan_value_pl ("0x2"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
167 | TEST_fpfp_b (totalordermag, snan_value_pl ("0x1"), -snan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
168 | TEST_fpfp_b (totalordermag, snan_value_pl ("0x2"), -snan_value_pl ("0x1"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
169 | TEST_fpfp_b (totalordermag, snan_value_pl ("0x2"), -snan_value_pl ("0x2"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
170 | TEST_fpfp_b (totalordermag, snan_value_pl ("0x2"), -snan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
171 | TEST_fpfp_b (totalordermag, snan_value_pl ("0x3fffff"), -snan_value_pl ("0x1"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
172 | TEST_fpfp_b (totalordermag, snan_value_pl ("0x3fffff"), -snan_value_pl ("0x2"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
173 | TEST_fpfp_b (totalordermag, snan_value_pl ("0x3fffff"), -snan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
174 | TEST_fpfp_b (totalordermag, -snan_value_pl ("0x1"), snan_value_pl ("0x1"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
175 | TEST_fpfp_b (totalordermag, -snan_value_pl ("0x1"), snan_value_pl ("0x2"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
176 | TEST_fpfp_b (totalordermag, -snan_value_pl ("0x1"), snan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
177 | TEST_fpfp_b (totalordermag, -snan_value_pl ("0x2"), snan_value_pl ("0x1"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
178 | TEST_fpfp_b (totalordermag, -snan_value_pl ("0x2"), snan_value_pl ("0x2"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
179 | TEST_fpfp_b (totalordermag, -snan_value_pl ("0x2"), snan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
180 | TEST_fpfp_b (totalordermag, -snan_value_pl ("0x3fffff"), snan_value_pl ("0x1"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
181 | TEST_fpfp_b (totalordermag, -snan_value_pl ("0x3fffff"), snan_value_pl ("0x2"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
182 | TEST_fpfp_b (totalordermag, -snan_value_pl ("0x3fffff"), snan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
183 | TEST_fpfp_b (totalordermag, -snan_value_pl ("0x1"), -snan_value_pl ("0x1"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
184 | TEST_fpfp_b (totalordermag, -snan_value_pl ("0x1"), -snan_value_pl ("0x2"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
185 | TEST_fpfp_b (totalordermag, -snan_value_pl ("0x1"), -snan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
186 | TEST_fpfp_b (totalordermag, -snan_value_pl ("0x2"), -snan_value_pl ("0x1"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
187 | TEST_fpfp_b (totalordermag, -snan_value_pl ("0x2"), -snan_value_pl ("0x2"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
188 | TEST_fpfp_b (totalordermag, -snan_value_pl ("0x2"), -snan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
189 | TEST_fpfp_b (totalordermag, -snan_value_pl ("0x3fffff"), -snan_value_pl ("0x1"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
190 | TEST_fpfp_b (totalordermag, -snan_value_pl ("0x3fffff"), -snan_value_pl ("0x2"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
191 | TEST_fpfp_b (totalordermag, -snan_value_pl ("0x3fffff"), -snan_value_pl ("0x3fffff"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
192 | TEST_fpfp_b (totalordermag, snan_value_pl ("0x3fffff"), qnan_value_pl ("0x1"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
193 | TEST_fpfp_b (totalordermag, -snan_value_pl ("0x3fffff"), -qnan_value_pl ("0x1"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
194 | TEST_fpfp_b (totalordermag, qnan_value_pl ("0x1"), snan_value_pl ("0x3fffff"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
195 | TEST_fpfp_b (totalordermag, -qnan_value_pl ("0x1"), -snan_value_pl ("0x3fffff"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
5cbb5849 | 196 | #if PAYLOAD_DIG >= 34 |
42760d76 JM |
197 | TEST_fpfp_b (totalordermag, qnan_value_pl ("0xffffffff"), qnan_value_pl ("0x100000000"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), |
198 | TEST_fpfp_b (totalordermag, -qnan_value_pl ("0xffffffff"), -qnan_value_pl ("0x100000000"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
199 | TEST_fpfp_b (totalordermag, qnan_value_pl ("0x100000000"), qnan_value_pl ("0xffffffff"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
200 | TEST_fpfp_b (totalordermag, -qnan_value_pl ("0x100000000"), -qnan_value_pl ("0xffffffff"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
201 | TEST_fpfp_b (totalordermag, snan_value_pl ("0xffffffff"), snan_value_pl ("0x100000000"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
202 | TEST_fpfp_b (totalordermag, -snan_value_pl ("0xffffffff"), -snan_value_pl ("0x100000000"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
203 | TEST_fpfp_b (totalordermag, snan_value_pl ("0x100000000"), snan_value_pl ("0xffffffff"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
204 | TEST_fpfp_b (totalordermag, -snan_value_pl ("0x100000000"), -snan_value_pl ("0xffffffff"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
205 | TEST_fpfp_b (totalordermag, qnan_value_pl ("0x100000000"), qnan_value_pl ("0x200000000"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
206 | TEST_fpfp_b (totalordermag, -qnan_value_pl ("0x100000000"), -qnan_value_pl ("0x200000000"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
207 | TEST_fpfp_b (totalordermag, qnan_value_pl ("0x200000000"), qnan_value_pl ("0x100000000"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
208 | TEST_fpfp_b (totalordermag, -qnan_value_pl ("0x200000000"), -qnan_value_pl ("0x100000000"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
209 | TEST_fpfp_b (totalordermag, snan_value_pl ("0x100000000"), snan_value_pl ("0x200000000"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
210 | TEST_fpfp_b (totalordermag, -snan_value_pl ("0x100000000"), -snan_value_pl ("0x200000000"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
211 | TEST_fpfp_b (totalordermag, snan_value_pl ("0x200000000"), snan_value_pl ("0x100000000"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
212 | TEST_fpfp_b (totalordermag, -snan_value_pl ("0x200000000"), -snan_value_pl ("0x100000000"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
5cbb5849 JM |
213 | #endif |
214 | #if PAYLOAD_DIG >= 66 | |
42760d76 JM |
215 | TEST_fpfp_b (totalordermag, qnan_value_pl ("0xffffffffffffffff"), qnan_value_pl ("0x10000000000000000"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_FLOAT128_PAYLOAD), |
216 | TEST_fpfp_b (totalordermag, -qnan_value_pl ("0xffffffffffffffff"), -qnan_value_pl ("0x10000000000000000"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_FLOAT128_PAYLOAD), | |
217 | TEST_fpfp_b (totalordermag, qnan_value_pl ("0x10000000000000000"), qnan_value_pl ("0xffffffffffffffff"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_FLOAT128_PAYLOAD), | |
218 | TEST_fpfp_b (totalordermag, -qnan_value_pl ("0x10000000000000000"), -qnan_value_pl ("0xffffffffffffffff"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_FLOAT128_PAYLOAD), | |
219 | TEST_fpfp_b (totalordermag, snan_value_pl ("0xffffffffffffffff"), snan_value_pl ("0x10000000000000000"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_FLOAT128_PAYLOAD), | |
220 | TEST_fpfp_b (totalordermag, -snan_value_pl ("0xffffffffffffffff"), -snan_value_pl ("0x10000000000000000"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_FLOAT128_PAYLOAD), | |
221 | TEST_fpfp_b (totalordermag, snan_value_pl ("0x10000000000000000"), snan_value_pl ("0xffffffffffffffff"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_FLOAT128_PAYLOAD), | |
222 | TEST_fpfp_b (totalordermag, -snan_value_pl ("0x10000000000000000"), -snan_value_pl ("0xffffffffffffffff"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_FLOAT128_PAYLOAD), | |
223 | TEST_fpfp_b (totalordermag, qnan_value_pl ("0x10000000000000000"), qnan_value_pl ("0x20000000000000000"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_FLOAT128_PAYLOAD), | |
224 | TEST_fpfp_b (totalordermag, -qnan_value_pl ("0x10000000000000000"), -qnan_value_pl ("0x20000000000000000"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_FLOAT128_PAYLOAD), | |
225 | TEST_fpfp_b (totalordermag, qnan_value_pl ("0x20000000000000000"), qnan_value_pl ("0x10000000000000000"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_FLOAT128_PAYLOAD), | |
226 | TEST_fpfp_b (totalordermag, -qnan_value_pl ("0x20000000000000000"), -qnan_value_pl ("0x10000000000000000"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_FLOAT128_PAYLOAD), | |
227 | TEST_fpfp_b (totalordermag, snan_value_pl ("0x10000000000000000"), snan_value_pl ("0x20000000000000000"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_FLOAT128_PAYLOAD), | |
228 | TEST_fpfp_b (totalordermag, -snan_value_pl ("0x10000000000000000"), -snan_value_pl ("0x20000000000000000"), 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_FLOAT128_PAYLOAD), | |
229 | TEST_fpfp_b (totalordermag, snan_value_pl ("0x20000000000000000"), snan_value_pl ("0x10000000000000000"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_FLOAT128_PAYLOAD), | |
230 | TEST_fpfp_b (totalordermag, -snan_value_pl ("0x20000000000000000"), -snan_value_pl ("0x10000000000000000"), 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED|XFAIL_FLOAT128_PAYLOAD), | |
5cbb5849 | 231 | #endif |
42760d76 JM |
232 | TEST_fpfp_b (totalordermag, 1, 0x1.000002p0, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), |
233 | TEST_fpfp_b (totalordermag, 0x1.000002p0, 1, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
234 | TEST_fpfp_b (totalordermag, 1, 0x0.ffffffp0, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
235 | TEST_fpfp_b (totalordermag, 0x0.ffffffp0, 1, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
5cbb5849 | 236 | #if MANT_DIG >= 53 |
42760d76 JM |
237 | TEST_fpfp_b (totalordermag, 1, 0x1.0000000000001p0, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), |
238 | TEST_fpfp_b (totalordermag, 0x1.0000000000001p0, 1, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
239 | TEST_fpfp_b (totalordermag, 1, 0x0.fffffffffffff8p0, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
240 | TEST_fpfp_b (totalordermag, 0x0.fffffffffffff8p0, 1, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
5cbb5849 JM |
241 | #endif |
242 | #if MANT_DIG >= 64 | |
42760d76 JM |
243 | TEST_fpfp_b (totalordermag, 1, 0x1.0000000000000002p0, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), |
244 | TEST_fpfp_b (totalordermag, 0x1.0000000000000002p0, 1, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
245 | TEST_fpfp_b (totalordermag, 1, 0x0.ffffffffffffffffp0, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
246 | TEST_fpfp_b (totalordermag, 0x0.ffffffffffffffffp0, 1, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
5cbb5849 JM |
247 | #endif |
248 | #if MANT_DIG >= 106 | |
42760d76 JM |
249 | TEST_fpfp_b (totalordermag, 1, 0x1.000000000000000000000000008p0, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), |
250 | TEST_fpfp_b (totalordermag, 0x1.000000000000000000000000008p0, 1, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
251 | TEST_fpfp_b (totalordermag, 1, 0x0.ffffffffffffffffffffffffffcp0, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
252 | TEST_fpfp_b (totalordermag, 0x0.ffffffffffffffffffffffffffcp0, 1, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
5cbb5849 JM |
253 | #endif |
254 | #if MANT_DIG >= 113 | |
42760d76 JM |
255 | TEST_fpfp_b (totalordermag, 1, 0x1.0000000000000000000000000001p0, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), |
256 | TEST_fpfp_b (totalordermag, 0x1.0000000000000000000000000001p0, 1, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
257 | TEST_fpfp_b (totalordermag, 1, 0x0.ffffffffffffffffffffffffffff8p0, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
258 | TEST_fpfp_b (totalordermag, 0x0.ffffffffffffffffffffffffffff8p0, 1, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), | |
5cbb5849 JM |
259 | #endif |
260 | }; | |
261 | ||
42760d76 | 262 | #ifndef COMPAT_TEST |
5cbb5849 JM |
263 | static void |
264 | totalordermag_test (void) | |
265 | { | |
42760d76 | 266 | ALL_RM_TEST (totalordermag, 1, totalordermag_test_data, RUN_TEST_LOOP_fpfp_b, END); |
5cbb5849 JM |
267 | } |
268 | ||
92061bb0 JM |
269 | static void |
270 | do_test (void) | |
271 | { | |
272 | totalordermag_test (); | |
273 | } | |
42760d76 | 274 | #endif |
92061bb0 | 275 | |
5cbb5849 JM |
276 | /* |
277 | * Local Variables: | |
278 | * mode:c | |
279 | * End: | |
280 | */ |