1 /* N1150 4: Characteristics of decimal floating types (not explicit)
2    C99 5.2.4.2.2: Characteristics of floating types.
3    A few simple checks on arithmetic operations. */
4 
5 #include "dfp-dbg.h"
6 
main()7 int main()
8 {
9   /* Assumes rounding mode. */
10   if (9999999.E90DF + 1.E90df != __builtin_infd32 ())
11     FAILURE
12 
13   if (!__builtin_isinfd32 (9999999.E90DF + 1.E90df))
14     FAILURE
15 
16   if (9.999999999999999E384dd + .000000000000001e384dd
17       != __builtin_infd32 ())
18     FAILURE
19 
20   if (-9999999.E90DF - 1.E90df != -__builtin_infd32 ())
21     FAILURE
22 
23   if (!__builtin_isinfd32 (9.999999999999999E384dd + .000000000000001e384dd))
24     FAILURE
25 
26   if (7.999999999999999999999999999999999E6144dl + 3.0E6144dl
27       != __builtin_infd32 ())
28     FAILURE
29 
30   if (__builtin_infd32 () * __builtin_infd32 () != __builtin_infd32 ())
31     FAILURE
32 
33   if (__builtin_infd32 () * 2 != __builtin_infd32 ())
34     FAILURE
35 
36   if (__builtin_infd64 () * -5 != -__builtin_infd32 ())
37     FAILURE
38 
39   if (!__builtin_isinfd128 (__builtin_infd32 () / 4))
40     FAILURE
41 
42   if (__builtin_infd64 () != __builtin_infd128 ())
43     FAILURE
44 
45   if (!__builtin_isinfd64 (__builtin_infd128 ()))
46     FAILURE
47 
48   if (__builtin_finited64 (__builtin_infd32 () * 4))
49     FAILURE
50 
51   if (!__builtin_finited128 (9.999999E90DL - 1.E90dd))
52     FAILURE
53 
54   if (__builtin_finited128 (__builtin_infd32 () *__builtin_infd128 ()))
55     FAILURE
56 
57   if (__builtin_finited32 (__builtin_nand32 ("")))
58     FAILURE
59 
60   FINISH
61 }
62