1 /* C99 6.5.9 Equality operators.
2    Compare decimal float constants against each other. */
3 
4 #include "dfp-dbg.h"
5 
6 extern void link_error (void);
7 
8 int
main()9 main ()
10 {
11   /* Compare like-typed positive constants. */
12   if (2.0df != 2.0df)
13     link_error ();
14 
15   /* Compare decimal float constants of different types. */
16   if (500e-2dl != 0.05e2df)
17     link_error ();
18 
19   /* Binary floating point introduces errors to decimal values. */
20   if (1.4 + 1.4 + 1.4 == 4.2)
21     link_error ();
22 
23   /* But, this looks more like what one would expect. */
24   if (1.4dd + 1.4dd + 1.4dd != 4.2dd)
25     link_error ();
26 
27   FINISH
28 }
29