1 /* Integer inputs within range of uintmax_t. */
45 i 0x7ffffffffffffLL:51
46 i -0x7ffffffffffffLL:52
48 i 0x8000000000000LL:52
49 i -0x8000000000000LL:52
51 i 0x8000000000001LL:52
52 i -0x8000000000001LL:53
53 i 0xfffffffffffffLL:52
54 i -0xfffffffffffffLL:53
56 i 0x10000000000000LL:53
57 i -0x10000000000000LL:53
59 i 0x10000000000001LL:53
60 i -0x10000000000001LL:54
61 i 0x1fffffffffffffLL:53
62 i -0x1fffffffffffffLL:54
64 i 0x20000000000000LL:54
65 i -0x20000000000000LL:54
67 i 0x20000000000001LL:54
68 i -0x20000000000001LL:55
69 i 0x3fffffffffffffffLL:62
70 i -0x3fffffffffffffffLL:63
72 i 0x4000000000000000LL:63
73 i -0x4000000000000000LL:63
75 i 0x4000000000000001LL:63
76 i -0x4000000000000001LL:64
77 i 0x7fffffffffffffffLL:63
78 i -0x7fffffffffffffffLL:64
80 i 0x8000000000000000ULL:64
83 i 0x8000000000000001ULL:64
84 i 0xffffffffffffffffULL:64
86 i 0x7fffff8000000000LL:63
87 i -0x7fffff8000000000LL:64
88 i 0x8000010000000000ULL:64
89 i 0xffffff0000000000ULL:64
91 i 0x7ffffffffffffc00LL:63
92 i -0x7ffffffffffffc00LL:64
93 i 0x8000000000000800ULL:64
94 i 0xfffffffffffff800ULL:64
97 /* Inputs with absolute value between 0 and 1. */
98 t min_subnorm_value a 0:1 1:1
99 t -min_subnorm_value a 0:1 -1:1
100 t min_value a 0:1 1:1
101 t -min_value a 0:1 -1:1
108 t 0x0.ffffffp-1 a 0:1 1:1
109 t -0x0.ffffffp-1 a 0:1 -1:1
111 t 0x0.fffffffffffff8p-1 a 0:1 1:1
112 t -0x0.fffffffffffff8p-1 a 0:1 -1:1
115 t 0x0.ffffffffffffffffp-1 a 0:1 1:1
116 t -0x0.ffffffffffffffffp-1 a 0:1 -1:1
119 t 0x0.ffffffffffffffffffffffffffcp-1 a 0:1 1:1
120 t -0x0.ffffffffffffffffffffffffffcp-1 a 0:1 -1:1
123 t 0x0.ffffffffffffffffffffffffffff8p-1 a 0:1 1:1
124 t -0x0.ffffffffffffffffffffffffffff8p-1 a 0:1 -1:1
128 t 0x1.000002p-1 c 0:1 1:1
129 t -0x1.000002p-1 c 0:1 -1:1
131 t 0x1.0000000000001p-1 c 0:1 1:1
132 t -0x1.0000000000001p-1 c 0:1 -1:1
135 t 0x1.0000000000000002p-1 c 0:1 1:1
136 t -0x1.0000000000000002p-1 c 0:1 -1:1
139 t 0x1.000000000000000000000000008p-1 c 0:1 1:1
140 t -0x1.000000000000000000000000008p-1 c 0:1 -1:1
143 t 0x1.0000000000000000000000000001p-1 c 0:1 1:1
144 t -0x1.0000000000000000000000000001p-1 c 0:1 -1:1
152 t 0x0.ffffffp0 c 0:1 1:1
153 t -0x0.ffffffp0 c 0:1 -1:1
155 t 0x0.fffffffffffff8p0 c 0:1 1:1
156 t -0x0.fffffffffffff8p0 c 0:1 -1:1
159 t 0x0.ffffffffffffffffp0 c 0:1 1:1
160 t -0x0.ffffffffffffffffp0 c 0:1 -1:1
163 t 0x0.ffffffffffffffffffffffffffcp0 c 0:1 1:1
164 t -0x0.ffffffffffffffffffffffffffcp0 c 0:1 -1:1
167 t 0x0.ffffffffffffffffffffffffffff8p0 c 0:1 1:1
168 t -0x0.ffffffffffffffffffffffffffff8p0 c 0:1 -1:1
171 /* Various non-integer inputs. */
203 /* 1, 1.5, 2, 2.5, 3, 3.5 +/- 1ulp. */
204 t 0x1.000002p0 a 1:1 2:2
205 t -0x1.000002p0 a -1:1 -2:2
206 t 0x2.fffffcp-1 a 1:1 2:2
207 t -0x2.fffffcp-1 a -1:1 -2:2
208 t 0x3.000004p-1 c 1:1 2:2
209 t -0x3.000004p-1 c -1:1 -2:2
210 t 0x0.ffffffp1 c 1:1 2:2
211 t -0x0.ffffffp1 c -1:1 -2:2
212 t 0x1.000002p1 a 2:2 3:2
213 t -0x1.000002p1 a -2:2 -3:3
214 t 0x4.fffff8p-1 a 2:2 3:2
215 t -0x4.fffff8p-1 a -2:2 -3:3
216 t 0x5.000008p-1 c 2:2 3:2
217 t -0x5.000008p-1 c -2:2 -3:3
218 t 0x2.fffffcp0 c 2:2 3:2
219 t -0x2.fffffcp0 c -2:2 -3:3
220 t 0x3.000004p0 a 3:2 4:3
221 t -0x3.000004p0 a -3:3 -4:3
222 t 0x6.fffff8p-1 a 3:2 4:3
223 t -0x6.fffff8p-1 a -3:3 -4:3
224 t 0x7.000008p-1 c 3:2 4:3
225 t -0x7.000008p-1 c -3:3 -4:3
227 t 0x1.0000000000001p0 a 1:1 2:2
228 t -0x1.0000000000001p0 a -1:1 -2:2
229 t 0x2.ffffffffffffep-1 a 1:1 2:2
230 t -0x2.ffffffffffffep-1 a -1:1 -2:2
231 t 0x3.0000000000002p-1 c 1:1 2:2
232 t -0x3.0000000000002p-1 c -1:1 -2:2
233 t 0x0.fffffffffffff8p1 c 1:1 2:2
234 t -0x0.fffffffffffff8p1 c -1:1 -2:2
235 t 0x1.0000000000001p1 a 2:2 3:2
236 t -0x1.0000000000001p1 a -2:2 -3:3
237 t 0x4.ffffffffffffcp-1 a 2:2 3:2
238 t -0x4.ffffffffffffcp-1 a -2:2 -3:3
239 t 0x5.0000000000004p-1 c 2:2 3:2
240 t -0x5.0000000000004p-1 c -2:2 -3:3
241 t 0x2.ffffffffffffep0 c 2:2 3:2
242 t -0x2.ffffffffffffep0 c -2:2 -3:3
243 t 0x3.0000000000002p0 a 3:2 4:3
244 t -0x3.0000000000002p0 a -3:3 -4:3
245 t 0x6.ffffffffffffcp-1 a 3:2 4:3
246 t -0x6.ffffffffffffcp-1 a -3:3 -4:3
247 t 0x7.0000000000004p-1 c 3:2 4:3
248 t -0x7.0000000000004p-1 c -3:3 -4:3
251 t 0x1.0000000000000002p0 a 1:1 2:2
252 t -0x1.0000000000000002p0 a -1:1 -2:2
253 t 0x2.fffffffffffffffcp-1 a 1:1 2:2
254 t -0x2.fffffffffffffffcp-1 a -1:1 -2:2
255 t 0x3.0000000000000004p-1 c 1:1 2:2
256 t -0x3.0000000000000004p-1 c -1:1 -2:2
257 t 0x0.ffffffffffffffffp1 c 1:1 2:2
258 t -0x0.ffffffffffffffffp1 c -1:1 -2:2
259 t 0x1.0000000000000002p1 a 2:2 3:2
260 t -0x1.0000000000000002p1 a -2:2 -3:3
261 t 0x4.fffffffffffffff8p-1 a 2:2 3:2
262 t -0x4.fffffffffffffff8p-1 a -2:2 -3:3
263 t 0x5.0000000000000008p-1 c 2:2 3:2
264 t -0x5.0000000000000008p-1 c -2:2 -3:3
265 t 0x2.fffffffffffffffcp0 c 2:2 3:2
266 t -0x2.fffffffffffffffcp0 c -2:2 -3:3
267 t 0x3.0000000000000004p0 a 3:2 4:3
268 t -0x3.0000000000000004p0 a -3:3 -4:3
269 t 0x6.fffffffffffffff8p-1 a 3:2 4:3
270 t -0x6.fffffffffffffff8p-1 a -3:3 -4:3
271 t 0x7.0000000000000008p-1 c 3:2 4:3
272 t -0x7.0000000000000008p-1 c -3:3 -4:3
275 t 0x1.000000000000000000000000008p0 a 1:1 2:2
276 t -0x1.000000000000000000000000008p0 a -1:1 -2:2
277 t 0x2.ffffffffffffffffffffffffffp-1 a 1:1 2:2
278 t -0x2.ffffffffffffffffffffffffffp-1 a -1:1 -2:2
279 t 0x3.00000000000000000000000001p-1 c 1:1 2:2
280 t -0x3.00000000000000000000000001p-1 c -1:1 -2:2
281 t 0x0.ffffffffffffffffffffffffffcp1 c 1:1 2:2
282 t -0x0.ffffffffffffffffffffffffffcp1 c -1:1 -2:2
283 t 0x1.000000000000000000000000008p1 a 2:2 3:2
284 t -0x1.000000000000000000000000008p1 a -2:2 -3:3
285 t 0x4.fffffffffffffffffffffffffep-1 a 2:2 3:2
286 t -0x4.fffffffffffffffffffffffffep-1 a -2:2 -3:3
287 t 0x5.00000000000000000000000002p-1 c 2:2 3:2
288 t -0x5.00000000000000000000000002p-1 c -2:2 -3:3
289 t 0x2.ffffffffffffffffffffffffffp0 c 2:2 3:2
290 t -0x2.ffffffffffffffffffffffffffp0 c -2:2 -3:3
291 t 0x3.00000000000000000000000001p0 a 3:2 4:3
292 t -0x3.00000000000000000000000001p0 a -3:3 -4:3
293 t 0x6.fffffffffffffffffffffffffep-1 a 3:2 4:3
294 t -0x6.fffffffffffffffffffffffffep-1 a -3:3 -4:3
295 t 0x7.00000000000000000000000002p-1 c 3:2 4:3
296 t -0x7.00000000000000000000000002p-1 c -3:3 -4:3
299 t 0x1.0000000000000000000000000001p0 a 1:1 2:2
300 t -0x1.0000000000000000000000000001p0 a -1:1 -2:2
301 t 0x2.fffffffffffffffffffffffffffep-1 a 1:1 2:2
302 t -0x2.fffffffffffffffffffffffffffep-1 a -1:1 -2:2
303 t 0x3.0000000000000000000000000002p-1 c 1:1 2:2
304 t -0x3.0000000000000000000000000002p-1 c -1:1 -2:2
305 t 0x0.ffffffffffffffffffffffffffff8p1 c 1:1 2:2
306 t -0x0.ffffffffffffffffffffffffffff8p1 c -1:1 -2:2
307 t 0x1.0000000000000000000000000001p1 a 2:2 3:2
308 t -0x1.0000000000000000000000000001p1 a -2:2 -3:3
309 t 0x4.fffffffffffffffffffffffffffcp-1 a 2:2 3:2
310 t -0x4.fffffffffffffffffffffffffffcp-1 a -2:2 -3:3
311 t 0x5.0000000000000000000000000004p-1 c 2:2 3:2
312 t -0x5.0000000000000000000000000004p-1 c -2:2 -3:3
313 t 0x2.fffffffffffffffffffffffffffep0 c 2:2 3:2
314 t -0x2.fffffffffffffffffffffffffffep0 c -2:2 -3:3
315 t 0x3.0000000000000000000000000002p0 a 3:2 4:3
316 t -0x3.0000000000000000000000000002p0 a -3:3 -4:3
317 t 0x6.fffffffffffffffffffffffffffcp-1 a 3:2 4:3
318 t -0x6.fffffffffffffffffffffffffffcp-1 a -3:3 -4:3
319 t 0x7.0000000000000000000000000004p-1 c 3:2 4:3
320 t -0x7.0000000000000000000000000004p-1 c -3:3 -4:3
323 /* 31, 32, 33 fractional bits. */
325 t 0x200000.7ffffffep0 a 0x200000:22 0x200001:22
326 t -0x200000.7ffffffep0 a -0x200000:22 -0x200001:23
327 t 0x200000.8p0 be 0x200000:22 0x200001:22
328 t -0x200000.8p0 be -0x200000:22 -0x200001:23
329 t 0x200000.80000002p0 c 0x200000:22 0x200001:22
330 t -0x200000.80000002p0 c -0x200000:22 -0x200001:23
331 t 0x200001.7ffffffep0 a 0x200001:22 0x200002:22
332 t -0x200001.7ffffffep0 a -0x200001:23 -0x200002:23
333 t 0x200001.8p0 bo 0x200001:22 0x200002:22
334 t -0x200001.8p0 bo -0x200001:23 -0x200002:23
335 t 0x200001.80000002p0 c 0x200001:22 0x200002:22
336 t -0x200001.80000002p0 c -0x200001:23 -0x200002:23
337 t 0x3fffff.fffffffep0 c 0x3fffff:22 0x400000:23
338 t -0x3fffff.fffffffep0 c -0x3fffff:23 -0x400000:23
339 t 0x100000.7fffffffp0 a 0x100000:21 0x100001:21
340 t -0x100000.7fffffffp0 a -0x100000:21 -0x100001:22
341 t 0x100000.8p0 be 0x100000:21 0x100001:21
342 t -0x100000.8p0 be -0x100000:21 -0x100001:22
343 t 0x100000.80000001p0 c 0x100000:21 0x100001:21
344 t -0x100000.80000001p0 c -0x100000:21 -0x100001:22
345 t 0x100001.7fffffffp0 a 0x100001:21 0x100002:21
346 t -0x100001.7fffffffp0 a -0x100001:22 -0x100002:22
347 t 0x100001.8p0 bo 0x100001:21 0x100002:21
348 t -0x100001.8p0 bo -0x100001:22 -0x100002:22
349 t 0x100001.80000001p0 c 0x100001:21 0x100002:21
350 t -0x100001.80000001p0 c -0x100001:22 -0x100002:22
351 t 0x1fffff.ffffffffp0 c 0x1fffff:21 0x200000:22
352 t -0x1fffff.ffffffffp0 c -0x1fffff:22 -0x200000:22
353 t 0x80000.7fffffff8p0 a 0x80000:20 0x80001:20
354 t -0x80000.7fffffff8p0 a -0x80000:20 -0x80001:21
355 t 0x80000.8p0 be 0x80000:20 0x80001:20
356 t -0x80000.8p0 be -0x80000:20 -0x80001:21
357 t 0x80000.800000008p0 c 0x80000:20 0x80001:20
358 t -0x80000.800000008p0 c -0x80000:20 -0x80001:21
359 t 0x80001.7fffffff8p0 a 0x80001:20 0x80002:20
360 t -0x80001.7fffffff8p0 a -0x80001:21 -0x80002:21
361 t 0x80001.8p0 bo 0x80001:20 0x80002:20
362 t -0x80001.8p0 bo -0x80001:21 -0x80002:21
363 t 0x80001.800000008p0 c 0x80001:20 0x80002:20
364 t -0x80001.800000008p0 c -0x80001:21 -0x80002:21
365 t 0xfffff.ffffffff8p0 c 0xfffff:20 0x100000:21
366 t -0xfffff.ffffffff8p0 c -0xfffff:21 -0x100000:21
369 t 0x100000000.7ffffffep0 a 0x100000000LL:33 0x100000001LL:33
370 t -0x100000000.7ffffffep0 a -0x100000000LL:33 -0x100000001LL:34
371 t 0x100000000.8p0 be 0x100000000LL:33 0x100000001LL:33
372 t -0x100000000.8p0 be -0x100000000LL:33 -0x100000001LL:34
373 t 0x100000000.80000002p0 c 0x100000000LL:33 0x100000001LL:33
374 t -0x100000000.80000002p0 c -0x100000000LL:33 -0x100000001LL:34
375 t 0x100000001.7ffffffep0 a 0x100000001LL:33 0x100000002LL:33
376 t -0x100000001.7ffffffep0 a -0x100000001LL:34 -0x100000002LL:34
377 t 0x100000001.8p0 bo 0x100000001LL:33 0x100000002LL:33
378 t -0x100000001.8p0 bo -0x100000001LL:34 -0x100000002LL:34
379 t 0x100000001.80000002p0 c 0x100000001LL:33 0x100000002LL:33
380 t -0x100000001.80000002p0 c -0x100000001LL:34 -0x100000002LL:34
381 t 0x1ffffffff.fffffffep0 c 0x1ffffffffLL:33 0x200000000LL:34
382 t -0x1ffffffff.fffffffep0 c -0x1ffffffffLL:34 -0x200000000LL:34
383 t 0x80000000.7fffffffp0 a 0x80000000LL:32 0x80000001LL:32
384 t -0x80000000.7fffffffp0 a -0x80000000LL:32 -0x80000001LL:33
385 t 0x80000000.8p0 be 0x80000000LL:32 0x80000001LL:32
386 t -0x80000000.8p0 be -0x80000000LL:32 -0x80000001LL:33
387 t 0x80000000.80000001p0 c 0x80000000LL:32 0x80000001LL:32
388 t -0x80000000.80000001p0 c -0x80000000LL:32 -0x80000001LL:33
389 t 0x80000001.7fffffffp0 a 0x80000001LL:32 0x80000002LL:32
390 t -0x80000001.7fffffffp0 a -0x80000001LL:33 -0x80000002LL:33
391 t 0x80000001.8p0 bo 0x80000001LL:32 0x80000002LL:32
392 t -0x80000001.8p0 bo -0x80000001LL:33 -0x80000002LL:33
393 t 0x80000001.80000001p0 c 0x80000001LL:32 0x80000002LL:32
394 t -0x80000001.80000001p0 c -0x80000001LL:33 -0x80000002LL:33
395 t 0xffffffff.ffffffffp0 c 0xffffffffLL:32 0x100000000LL:33
396 t -0xffffffff.ffffffffp0 c -0xffffffffLL:33 -0x100000000LL:33
397 t 0x40000000.7fffffff8p0 a 0x40000000LL:31 0x40000001LL:31
398 t -0x40000000.7fffffff8p0 a -0x40000000LL:31 -0x40000001LL:32
399 t 0x40000000.8p0 be 0x40000000LL:31 0x40000001LL:31
400 t -0x40000000.8p0 be -0x40000000LL:31 -0x40000001LL:32
401 t 0x40000000.800000008p0 c 0x40000000LL:31 0x40000001LL:31
402 t -0x40000000.800000008p0 c -0x40000000LL:31 -0x40000001LL:32
403 t 0x40000001.7fffffff8p0 a 0x40000001LL:31 0x40000002LL:31
404 t -0x40000001.7fffffff8p0 a -0x40000001LL:32 -0x40000002LL:32
405 t 0x40000001.8p0 bo 0x40000001LL:31 0x40000002LL:31
406 t -0x40000001.8p0 bo -0x40000001LL:32 -0x40000002LL:32
407 t 0x40000001.800000008p0 c 0x40000001LL:31 0x40000002LL:31
408 t -0x40000001.800000008p0 c -0x40000001LL:32 -0x40000002LL:32
409 t 0x7fffffff.ffffffff8p0 c 0x7fffffffLL:31 0x80000000LL:32
410 t -0x7fffffff.ffffffff8p0 c -0x7fffffffLL:32 -0x80000000LL:32
413 /* Tests where overflow depends on the rounding mode. */
415 t 0x7fffffffffffffff.8p0 bo 0x7fffffffffffffffLL:63 0x8000000000000000ULL:64
418 t 0x7fffffffffffffff.7fp0 a 0x7fffffffffffffffLL:63 0x8000000000000000ULL:64
419 t 0x7fffffffffffffff.81p0 c 0x7fffffffffffffffLL:63 0x8000000000000000ULL:64
420 t 0xffffffffffffffff.7fp0 a 0xffffffffffffffffULL:64 0x10000000000000000ULL:65
421 t 0xffffffffffffffff.8p0 bo 0xffffffffffffffffULL:64 0x10000000000000000ULL:65
422 t 0xffffffffffffffff.81p0 c 0xffffffffffffffffULL:64 0x10000000000000000ULL:65
423 t -0x8000000000000000.7fp0 a -INT64_MAX-1:64 -0x8000000000000001LL:65
424 t -0x8000000000000000.8p0 be -INT64_MAX-1:64 -0x8000000000000001LL:65
425 t -0x8000000000000000.81p0 c -INT64_MAX-1:64 -0x8000000000000001LL:65