1    /* Integer inputs within range of uintmax_t.  */
2i 1:1
3i -1:1
4i 2:2
5i -2:2
6i 3:2
7i -3:3
8i 4:3
9i -4:3
10i 5:3
11i -5:4
12i 6:3
13i -6:4
14i 7:3
15i -7:4
16i 8:4
17i -8:4
18i 9:4
19i -9:5
20i 15:4
21i -15:5
22i 16:5
23i -16:5
24i 17:5
25i -17:6
26i 0x3fffff:22
27i -0x3fffff:23
28i 0x400000:23
29i -0x400000:23
30i 0x400001:23
31i -0x400001:24
32i 0x7fffff:23
33i -0x7fffff:24
34i 0x800000:24
35i -0x800000:24
36i 0x800001:24
37i -0x800001:25
38i 0xffffff:24
39i -0xffffff:25
40i 0x1000000:25
41i -0x1000000:25
42#if MANT_DIG >= 53
43i 0x1000001:25
44i -0x1000001:26
45i 0x7ffffffffffffLL:51
46i -0x7ffffffffffffLL:52
47#endif
48i 0x8000000000000LL:52
49i -0x8000000000000LL:52
50#if MANT_DIG >= 53
51i 0x8000000000001LL:52
52i -0x8000000000001LL:53
53i 0xfffffffffffffLL:52
54i -0xfffffffffffffLL:53
55#endif
56i 0x10000000000000LL:53
57i -0x10000000000000LL:53
58#if MANT_DIG >= 53
59i 0x10000000000001LL:53
60i -0x10000000000001LL:54
61i 0x1fffffffffffffLL:53
62i -0x1fffffffffffffLL:54
63#endif
64i 0x20000000000000LL:54
65i -0x20000000000000LL:54
66#if MANT_DIG >= 64
67i 0x20000000000001LL:54
68i -0x20000000000001LL:55
69i 0x3fffffffffffffffLL:62
70i -0x3fffffffffffffffLL:63
71#endif
72i 0x4000000000000000LL:63
73i -0x4000000000000000LL:63
74#if MANT_DIG >= 64
75i 0x4000000000000001LL:63
76i -0x4000000000000001LL:64
77i 0x7fffffffffffffffLL:63
78i -0x7fffffffffffffffLL:64
79#endif
80i 0x8000000000000000ULL:64
81i -INT64_MAX-1:64
82#if MANT_DIG >= 64
83i 0x8000000000000001ULL:64
84i 0xffffffffffffffffULL:64
85#endif
86i 0x7fffff8000000000LL:63
87i -0x7fffff8000000000LL:64
88i 0x8000010000000000ULL:64
89i 0xffffff0000000000ULL:64
90#if MANT_DIG >= 53
91i 0x7ffffffffffffc00LL:63
92i -0x7ffffffffffffc00LL:64
93i 0x8000000000000800ULL:64
94i 0xfffffffffffff800ULL:64
95#endif
96
97    /* Inputs with absolute value between 0 and 1.  */
98t min_subnorm_value a 0:1 1:1
99t -min_subnorm_value a 0:1 -1:1
100t min_value a 0:1 1:1
101t -min_value a 0:1 -1:1
102t 0.1 a 0:1 1:1
103t -0.1 a 0:1 -1:1
104t 0.25 a 0:1 1:1
105t -0.25 a 0:1 -1:1
106t 0.499 a 0:1 1:1
107t -0.499 a 0:1 -1:1
108t 0x0.ffffffp-1 a 0:1 1:1
109t -0x0.ffffffp-1 a 0:1 -1:1
110#if MANT_DIG >= 53
111t 0x0.fffffffffffff8p-1 a 0:1 1:1
112t -0x0.fffffffffffff8p-1 a 0:1 -1:1
113#endif
114#if MANT_DIG >= 64
115t 0x0.ffffffffffffffffp-1 a 0:1 1:1
116t -0x0.ffffffffffffffffp-1 a 0:1 -1:1
117#endif
118#if MANT_DIG >= 106
119t 0x0.ffffffffffffffffffffffffffcp-1 a 0:1 1:1
120t -0x0.ffffffffffffffffffffffffffcp-1 a 0:1 -1:1
121#endif
122#if MANT_DIG >= 113
123t 0x0.ffffffffffffffffffffffffffff8p-1 a 0:1 1:1
124t -0x0.ffffffffffffffffffffffffffff8p-1 a 0:1 -1:1
125#endif
126t 0.5 be 0:1 1:1
127t -0.5 be 0:1 -1:1
128t 0x1.000002p-1 c 0:1 1:1
129t -0x1.000002p-1 c 0:1 -1:1
130#if MANT_DIG >= 53
131t 0x1.0000000000001p-1 c 0:1 1:1
132t -0x1.0000000000001p-1 c 0:1 -1:1
133#endif
134#if MANT_DIG >= 64
135t 0x1.0000000000000002p-1 c 0:1 1:1
136t -0x1.0000000000000002p-1 c 0:1 -1:1
137#endif
138#if MANT_DIG >= 106
139t 0x1.000000000000000000000000008p-1 c 0:1 1:1
140t -0x1.000000000000000000000000008p-1 c 0:1 -1:1
141#endif
142#if MANT_DIG >= 113
143t 0x1.0000000000000000000000000001p-1 c 0:1 1:1
144t -0x1.0000000000000000000000000001p-1 c 0:1 -1:1
145#endif
146t 0.501 c 0:1 1:1
147t -0.501 c 0:1 -1:1
148t 0.75 c 0:1 1:1
149t -0.75 c 0:1 -1:1
150t 0.9 c 0:1 1:1
151t -0.9 c 0:1 -1:1
152t 0x0.ffffffp0 c 0:1 1:1
153t -0x0.ffffffp0 c 0:1 -1:1
154#if MANT_DIG >= 53
155t 0x0.fffffffffffff8p0 c 0:1 1:1
156t -0x0.fffffffffffff8p0 c 0:1 -1:1
157#endif
158#if MANT_DIG >= 64
159t 0x0.ffffffffffffffffp0 c 0:1 1:1
160t -0x0.ffffffffffffffffp0 c 0:1 -1:1
161#endif
162#if MANT_DIG >= 106
163t 0x0.ffffffffffffffffffffffffffcp0 c 0:1 1:1
164t -0x0.ffffffffffffffffffffffffffcp0 c 0:1 -1:1
165#endif
166#if MANT_DIG >= 113
167t 0x0.ffffffffffffffffffffffffffff8p0 c 0:1 1:1
168t -0x0.ffffffffffffffffffffffffffff8p0 c 0:1 -1:1
169#endif
170
171    /* Various non-integer inputs.  */
172t 1.25 a 1:1 2:2
173t -1.25 a -1:1 -2:2
174t 1.5 bo 1:1 2:2
175t -1.5 bo -1:1 -2:2
176t 1.75 c 1:1 2:2
177t -1.75 c -1:1 -2:2
178t 2.25 a 2:2 3:2
179t -2.25 a -2:2 -3:3
180t 2.5 be 2:2 3:2
181t -2.5 be -2:2 -3:3
182t 2.75 c 2:2 3:2
183t -2.75 c -2:2 -3:3
184t 3.25 a 3:2 4:3
185t -3.25 a -3:3 -4:3
186t 3.5 bo 3:2 4:3
187t -3.5 bo -3:3 -4:3
188t 3.75 c 3:2 4:3
189t -3.75 c -3:3 -4:3
190t 4.25 a 4:3 5:3
191t -4.25 a -4:3 -5:4
192t 4.5 be 4:3 5:3
193t -4.5 be -4:3 -5:4
194t 4.75 c 4:3 5:3
195t -4.75 c -4:3 -5:4
196t 5.25 a 5:3 6:3
197t -5.25 a -5:4 -6:4
198t 5.5 bo 5:3 6:3
199t -5.5 bo -5:4 -6:4
200t 5.75 c 5:3 6:3
201t -5.75 c -5:4 -6:4
202
203    /* 1, 1.5, 2, 2.5, 3, 3.5 +/- 1ulp.  */
204t 0x1.000002p0 a 1:1 2:2
205t -0x1.000002p0 a -1:1 -2:2
206t 0x2.fffffcp-1 a 1:1 2:2
207t -0x2.fffffcp-1 a -1:1 -2:2
208t 0x3.000004p-1 c 1:1 2:2
209t -0x3.000004p-1 c -1:1 -2:2
210t 0x0.ffffffp1 c 1:1 2:2
211t -0x0.ffffffp1 c -1:1 -2:2
212t 0x1.000002p1 a 2:2 3:2
213t -0x1.000002p1 a -2:2 -3:3
214t 0x4.fffff8p-1 a 2:2 3:2
215t -0x4.fffff8p-1 a -2:2 -3:3
216t 0x5.000008p-1 c 2:2 3:2
217t -0x5.000008p-1 c -2:2 -3:3
218t 0x2.fffffcp0 c 2:2 3:2
219t -0x2.fffffcp0 c -2:2 -3:3
220t 0x3.000004p0 a 3:2 4:3
221t -0x3.000004p0 a -3:3 -4:3
222t 0x6.fffff8p-1 a 3:2 4:3
223t -0x6.fffff8p-1 a -3:3 -4:3
224t 0x7.000008p-1 c 3:2 4:3
225t -0x7.000008p-1 c -3:3 -4:3
226#if MANT_DIG >= 53
227t 0x1.0000000000001p0 a 1:1 2:2
228t -0x1.0000000000001p0 a -1:1 -2:2
229t 0x2.ffffffffffffep-1 a 1:1 2:2
230t -0x2.ffffffffffffep-1 a -1:1 -2:2
231t 0x3.0000000000002p-1 c 1:1 2:2
232t -0x3.0000000000002p-1 c -1:1 -2:2
233t 0x0.fffffffffffff8p1 c 1:1 2:2
234t -0x0.fffffffffffff8p1 c -1:1 -2:2
235t 0x1.0000000000001p1 a 2:2 3:2
236t -0x1.0000000000001p1 a -2:2 -3:3
237t 0x4.ffffffffffffcp-1 a 2:2 3:2
238t -0x4.ffffffffffffcp-1 a -2:2 -3:3
239t 0x5.0000000000004p-1 c 2:2 3:2
240t -0x5.0000000000004p-1 c -2:2 -3:3
241t 0x2.ffffffffffffep0 c 2:2 3:2
242t -0x2.ffffffffffffep0 c -2:2 -3:3
243t 0x3.0000000000002p0 a 3:2 4:3
244t -0x3.0000000000002p0 a -3:3 -4:3
245t 0x6.ffffffffffffcp-1 a 3:2 4:3
246t -0x6.ffffffffffffcp-1 a -3:3 -4:3
247t 0x7.0000000000004p-1 c 3:2 4:3
248t -0x7.0000000000004p-1 c -3:3 -4:3
249#endif
250#if MANT_DIG >= 64
251t 0x1.0000000000000002p0 a 1:1 2:2
252t -0x1.0000000000000002p0 a -1:1 -2:2
253t 0x2.fffffffffffffffcp-1 a 1:1 2:2
254t -0x2.fffffffffffffffcp-1 a -1:1 -2:2
255t 0x3.0000000000000004p-1 c 1:1 2:2
256t -0x3.0000000000000004p-1 c -1:1 -2:2
257t 0x0.ffffffffffffffffp1 c 1:1 2:2
258t -0x0.ffffffffffffffffp1 c -1:1 -2:2
259t 0x1.0000000000000002p1 a 2:2 3:2
260t -0x1.0000000000000002p1 a -2:2 -3:3
261t 0x4.fffffffffffffff8p-1 a 2:2 3:2
262t -0x4.fffffffffffffff8p-1 a -2:2 -3:3
263t 0x5.0000000000000008p-1 c 2:2 3:2
264t -0x5.0000000000000008p-1 c -2:2 -3:3
265t 0x2.fffffffffffffffcp0 c 2:2 3:2
266t -0x2.fffffffffffffffcp0 c -2:2 -3:3
267t 0x3.0000000000000004p0 a 3:2 4:3
268t -0x3.0000000000000004p0 a -3:3 -4:3
269t 0x6.fffffffffffffff8p-1 a 3:2 4:3
270t -0x6.fffffffffffffff8p-1 a -3:3 -4:3
271t 0x7.0000000000000008p-1 c 3:2 4:3
272t -0x7.0000000000000008p-1 c -3:3 -4:3
273#endif
274#if MANT_DIG >= 106
275t 0x1.000000000000000000000000008p0 a 1:1 2:2
276t -0x1.000000000000000000000000008p0 a -1:1 -2:2
277t 0x2.ffffffffffffffffffffffffffp-1 a 1:1 2:2
278t -0x2.ffffffffffffffffffffffffffp-1 a -1:1 -2:2
279t 0x3.00000000000000000000000001p-1 c 1:1 2:2
280t -0x3.00000000000000000000000001p-1 c -1:1 -2:2
281t 0x0.ffffffffffffffffffffffffffcp1 c 1:1 2:2
282t -0x0.ffffffffffffffffffffffffffcp1 c -1:1 -2:2
283t 0x1.000000000000000000000000008p1 a 2:2 3:2
284t -0x1.000000000000000000000000008p1 a -2:2 -3:3
285t 0x4.fffffffffffffffffffffffffep-1 a 2:2 3:2
286t -0x4.fffffffffffffffffffffffffep-1 a -2:2 -3:3
287t 0x5.00000000000000000000000002p-1 c 2:2 3:2
288t -0x5.00000000000000000000000002p-1 c -2:2 -3:3
289t 0x2.ffffffffffffffffffffffffffp0 c 2:2 3:2
290t -0x2.ffffffffffffffffffffffffffp0 c -2:2 -3:3
291t 0x3.00000000000000000000000001p0 a 3:2 4:3
292t -0x3.00000000000000000000000001p0 a -3:3 -4:3
293t 0x6.fffffffffffffffffffffffffep-1 a 3:2 4:3
294t -0x6.fffffffffffffffffffffffffep-1 a -3:3 -4:3
295t 0x7.00000000000000000000000002p-1 c 3:2 4:3
296t -0x7.00000000000000000000000002p-1 c -3:3 -4:3
297#endif
298#if MANT_DIG >= 113
299t 0x1.0000000000000000000000000001p0 a 1:1 2:2
300t -0x1.0000000000000000000000000001p0 a -1:1 -2:2
301t 0x2.fffffffffffffffffffffffffffep-1 a 1:1 2:2
302t -0x2.fffffffffffffffffffffffffffep-1 a -1:1 -2:2
303t 0x3.0000000000000000000000000002p-1 c 1:1 2:2
304t -0x3.0000000000000000000000000002p-1 c -1:1 -2:2
305t 0x0.ffffffffffffffffffffffffffff8p1 c 1:1 2:2
306t -0x0.ffffffffffffffffffffffffffff8p1 c -1:1 -2:2
307t 0x1.0000000000000000000000000001p1 a 2:2 3:2
308t -0x1.0000000000000000000000000001p1 a -2:2 -3:3
309t 0x4.fffffffffffffffffffffffffffcp-1 a 2:2 3:2
310t -0x4.fffffffffffffffffffffffffffcp-1 a -2:2 -3:3
311t 0x5.0000000000000000000000000004p-1 c 2:2 3:2
312t -0x5.0000000000000000000000000004p-1 c -2:2 -3:3
313t 0x2.fffffffffffffffffffffffffffep0 c 2:2 3:2
314t -0x2.fffffffffffffffffffffffffffep0 c -2:2 -3:3
315t 0x3.0000000000000000000000000002p0 a 3:2 4:3
316t -0x3.0000000000000000000000000002p0 a -3:3 -4:3
317t 0x6.fffffffffffffffffffffffffffcp-1 a 3:2 4:3
318t -0x6.fffffffffffffffffffffffffffcp-1 a -3:3 -4:3
319t 0x7.0000000000000000000000000004p-1 c 3:2 4:3
320t -0x7.0000000000000000000000000004p-1 c -3:3 -4:3
321#endif
322
323    /* 31, 32, 33 fractional bits.  */
324#if MANT_DIG >= 53
325t 0x200000.7ffffffep0 a 0x200000:22 0x200001:22
326t -0x200000.7ffffffep0 a -0x200000:22 -0x200001:23
327t 0x200000.8p0 be 0x200000:22 0x200001:22
328t -0x200000.8p0 be -0x200000:22 -0x200001:23
329t 0x200000.80000002p0 c 0x200000:22 0x200001:22
330t -0x200000.80000002p0 c -0x200000:22 -0x200001:23
331t 0x200001.7ffffffep0 a 0x200001:22 0x200002:22
332t -0x200001.7ffffffep0 a -0x200001:23 -0x200002:23
333t 0x200001.8p0 bo 0x200001:22 0x200002:22
334t -0x200001.8p0 bo -0x200001:23 -0x200002:23
335t 0x200001.80000002p0 c 0x200001:22 0x200002:22
336t -0x200001.80000002p0 c -0x200001:23 -0x200002:23
337t 0x3fffff.fffffffep0 c 0x3fffff:22 0x400000:23
338t -0x3fffff.fffffffep0 c -0x3fffff:23 -0x400000:23
339t 0x100000.7fffffffp0 a 0x100000:21 0x100001:21
340t -0x100000.7fffffffp0 a -0x100000:21 -0x100001:22
341t 0x100000.8p0 be 0x100000:21 0x100001:21
342t -0x100000.8p0 be -0x100000:21 -0x100001:22
343t 0x100000.80000001p0 c 0x100000:21 0x100001:21
344t -0x100000.80000001p0 c -0x100000:21 -0x100001:22
345t 0x100001.7fffffffp0 a 0x100001:21 0x100002:21
346t -0x100001.7fffffffp0 a -0x100001:22 -0x100002:22
347t 0x100001.8p0 bo 0x100001:21 0x100002:21
348t -0x100001.8p0 bo -0x100001:22 -0x100002:22
349t 0x100001.80000001p0 c 0x100001:21 0x100002:21
350t -0x100001.80000001p0 c -0x100001:22 -0x100002:22
351t 0x1fffff.ffffffffp0 c 0x1fffff:21 0x200000:22
352t -0x1fffff.ffffffffp0 c -0x1fffff:22 -0x200000:22
353t 0x80000.7fffffff8p0 a 0x80000:20 0x80001:20
354t -0x80000.7fffffff8p0 a -0x80000:20 -0x80001:21
355t 0x80000.8p0 be 0x80000:20 0x80001:20
356t -0x80000.8p0 be -0x80000:20 -0x80001:21
357t 0x80000.800000008p0 c 0x80000:20 0x80001:20
358t -0x80000.800000008p0 c -0x80000:20 -0x80001:21
359t 0x80001.7fffffff8p0 a 0x80001:20 0x80002:20
360t -0x80001.7fffffff8p0 a -0x80001:21 -0x80002:21
361t 0x80001.8p0 bo 0x80001:20 0x80002:20
362t -0x80001.8p0 bo -0x80001:21 -0x80002:21
363t 0x80001.800000008p0 c 0x80001:20 0x80002:20
364t -0x80001.800000008p0 c -0x80001:21 -0x80002:21
365t 0xfffff.ffffffff8p0 c 0xfffff:20 0x100000:21
366t -0xfffff.ffffffff8p0 c -0xfffff:21 -0x100000:21
367#endif
368#if MANT_DIG >= 64
369t 0x100000000.7ffffffep0 a 0x100000000LL:33 0x100000001LL:33
370t -0x100000000.7ffffffep0 a -0x100000000LL:33 -0x100000001LL:34
371t 0x100000000.8p0 be 0x100000000LL:33 0x100000001LL:33
372t -0x100000000.8p0 be -0x100000000LL:33 -0x100000001LL:34
373t 0x100000000.80000002p0 c 0x100000000LL:33 0x100000001LL:33
374t -0x100000000.80000002p0 c -0x100000000LL:33 -0x100000001LL:34
375t 0x100000001.7ffffffep0 a 0x100000001LL:33 0x100000002LL:33
376t -0x100000001.7ffffffep0 a -0x100000001LL:34 -0x100000002LL:34
377t 0x100000001.8p0 bo 0x100000001LL:33 0x100000002LL:33
378t -0x100000001.8p0 bo -0x100000001LL:34 -0x100000002LL:34
379t 0x100000001.80000002p0 c 0x100000001LL:33 0x100000002LL:33
380t -0x100000001.80000002p0 c -0x100000001LL:34 -0x100000002LL:34
381t 0x1ffffffff.fffffffep0 c 0x1ffffffffLL:33 0x200000000LL:34
382t -0x1ffffffff.fffffffep0 c -0x1ffffffffLL:34 -0x200000000LL:34
383t 0x80000000.7fffffffp0 a 0x80000000LL:32 0x80000001LL:32
384t -0x80000000.7fffffffp0 a -0x80000000LL:32 -0x80000001LL:33
385t 0x80000000.8p0 be 0x80000000LL:32 0x80000001LL:32
386t -0x80000000.8p0 be -0x80000000LL:32 -0x80000001LL:33
387t 0x80000000.80000001p0 c 0x80000000LL:32 0x80000001LL:32
388t -0x80000000.80000001p0 c -0x80000000LL:32 -0x80000001LL:33
389t 0x80000001.7fffffffp0 a 0x80000001LL:32 0x80000002LL:32
390t -0x80000001.7fffffffp0 a -0x80000001LL:33 -0x80000002LL:33
391t 0x80000001.8p0 bo 0x80000001LL:32 0x80000002LL:32
392t -0x80000001.8p0 bo -0x80000001LL:33 -0x80000002LL:33
393t 0x80000001.80000001p0 c 0x80000001LL:32 0x80000002LL:32
394t -0x80000001.80000001p0 c -0x80000001LL:33 -0x80000002LL:33
395t 0xffffffff.ffffffffp0 c 0xffffffffLL:32 0x100000000LL:33
396t -0xffffffff.ffffffffp0 c -0xffffffffLL:33 -0x100000000LL:33
397t 0x40000000.7fffffff8p0 a 0x40000000LL:31 0x40000001LL:31
398t -0x40000000.7fffffff8p0 a -0x40000000LL:31 -0x40000001LL:32
399t 0x40000000.8p0 be 0x40000000LL:31 0x40000001LL:31
400t -0x40000000.8p0 be -0x40000000LL:31 -0x40000001LL:32
401t 0x40000000.800000008p0 c 0x40000000LL:31 0x40000001LL:31
402t -0x40000000.800000008p0 c -0x40000000LL:31 -0x40000001LL:32
403t 0x40000001.7fffffff8p0 a 0x40000001LL:31 0x40000002LL:31
404t -0x40000001.7fffffff8p0 a -0x40000001LL:32 -0x40000002LL:32
405t 0x40000001.8p0 bo 0x40000001LL:31 0x40000002LL:31
406t -0x40000001.8p0 bo -0x40000001LL:32 -0x40000002LL:32
407t 0x40000001.800000008p0 c 0x40000001LL:31 0x40000002LL:31
408t -0x40000001.800000008p0 c -0x40000001LL:32 -0x40000002LL:32
409t 0x7fffffff.ffffffff8p0 c 0x7fffffffLL:31 0x80000000LL:32
410t -0x7fffffff.ffffffff8p0 c -0x7fffffffLL:32 -0x80000000LL:32
411#endif
412
413    /* Tests where overflow depends on the rounding mode.  */
414#if MANT_DIG >= 64
415t 0x7fffffffffffffff.8p0 bo 0x7fffffffffffffffLL:63 0x8000000000000000ULL:64
416#endif
417#if MANT_DIG >= 72
418t 0x7fffffffffffffff.7fp0 a 0x7fffffffffffffffLL:63 0x8000000000000000ULL:64
419t 0x7fffffffffffffff.81p0 c 0x7fffffffffffffffLL:63 0x8000000000000000ULL:64
420t 0xffffffffffffffff.7fp0 a 0xffffffffffffffffULL:64 0x10000000000000000ULL:65
421t 0xffffffffffffffff.8p0 bo 0xffffffffffffffffULL:64 0x10000000000000000ULL:65
422t 0xffffffffffffffff.81p0 c 0xffffffffffffffffULL:64 0x10000000000000000ULL:65
423t -0x8000000000000000.7fp0 a -INT64_MAX-1:64 -0x8000000000000001LL:65
424t -0x8000000000000000.8p0 be -INT64_MAX-1:64 -0x8000000000000001LL:65
425t -0x8000000000000000.81p0 c -INT64_MAX-1:64 -0x8000000000000001LL:65
426#endif
427