We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a2e6010 commit 9225471Copy full SHA for 9225471
tests/float_short_test.c
@@ -45,10 +45,14 @@ static void
45
float_to_short_test (void)
46
{
47
static float fpos [] =
48
- { 0.95, 0.99, 1.0, 1.01, 1.1, 2.0, 11.1, 111.1, 2222.2, 33333.3
+ { 0.95, 0.99, 1.0, 1.01, 1.1, 2.0, 11.1, 111.1, 2222.2, 33333.3,
49
+ // Some "almost 1" as corner cases
50
+ 32767./32768., (32767. + 0.4)/32768., (32767. + 0.5)/32768., (32767. + 0.6)/32768., (32767. + 0.9)/32768.,
51
} ;
52
static float fneg [] =
- { -0.95, -0.99, -1.0, -1.01, -1.1, -2.0, -11.1, -111.1, -2222.2, -33333.3
53
+ { -0.95, -0.99, -1.0, -1.01, -1.1, -2.0, -11.1, -111.1, -2222.2, -33333.3,
54
55
+ -32767./32768., -(32767. + 0.4)/32768., -(32767. + 0.5)/32768., -(32767. + 0.6)/32768., -(32767. + 0.9)/32768.,
56
57
58
static short out [MAX (ARRAY_LEN (fpos), ARRAY_LEN (fneg))] ;
0 commit comments