2 * Test m68k extended double denormals.
8 #define TEST(X, Y) { X, Y, X * Y }
10 static volatile long double test
[][3] = {
11 TEST(0x1p
+16383l, 0x1p
-16446l),
12 TEST(0x1.1p
-8223l, 0x1.1p
-8224l),
13 TEST(1.0l, 0x1p
-16383l),
18 static void dump_ld(const char *label
, long double ld
)
31 printf("%12s: % -27La 0x%04x 0x%08x 0x%08x\n", label
, u
.d
, u
.exp
, u
.h
, u
.l
);
36 int i
, n
= sizeof(test
) / sizeof(test
[0]), err
= 0;
38 for (i
= 0; i
< n
; ++i
) {
39 long double x
= test
[i
][0];
40 long double y
= test
[i
][1];
41 long double build_mul
= test
[i
][2];
42 long double runtime_mul
= x
* y
;
44 if (runtime_mul
!= build_mul
) {
47 dump_ld("build_mul", build_mul
);
48 dump_ld("runtime_mul", runtime_mul
);