7 #pragma disable_warning 122
9 #if !defined( __SDCC_pdk14) && !defined( __SDCC_pdk15) // Not enough memory
10 float gfa
= 1.0 / 0.0;
11 float gfb
= (-1.0) / 0.0;
12 float gfc
= 0.0 / 0.0;
15 static float sfa
= 1.0 / 0.0;
16 static float sfb
= (-1.0) / 0.0;
17 static float sfc
= 0.0 / 0.0;
18 static float sfd
= 1.0;
20 static float divTest(float a
, float b
)
29 #if !defined( __SDCC_pdk14) && !defined( __SDCC_pdk15) // Not enough memory
30 float lfa
= 1.0 / 0.0;
31 float lfb
= (-1.0) / 0.0;
32 float lfc
= 0.0 / 0.0;
47 ASSERT (!isnan (gfd
));
48 ASSERT (!isnan (sfd
));
49 ASSERT (!isnan (lfd
));
51 ASSERT (!isinf (gfd
));
52 ASSERT (!isinf (sfd
));
53 ASSERT (!isinf (lfd
));
55 ASSERT (isinf (divTest (1.0, 0.0)));
56 ASSERT (isinf (divTest (-1.0, 0.0)));
57 ASSERT (isnan (divTest (0.0, 0.0)));
59 ASSERT (!isinf (divTest (1.0, 0.5)));
60 ASSERT (!isnan (divTest (1.0, 0.5)));
62 ASSERT (!isnan (divTest (3e38
, 2e-38)));
63 ASSERT (isinf (divTest (3e38
, 2e-38)));