Skip to content

Commit

Permalink
tests/float_short_test.c: Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
erikd committed Aug 24, 2019
1 parent a3872f0 commit 9fb7f43
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/float_short_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,15 @@ float_to_short_test (void)
{
static float fpos [] =
{ 0.95, 0.99, 1.0, 1.01, 1.1, 2.0, 11.1, 111.1, 2222.2, 33333.3,
// Some "almost 1" as corner cases
32767./32768., (32767. + 0.4)/32768., (32767. + 0.5)/32768., (32767. + 0.6)/32768., (32767. + 0.9)/32768.,
// Some "almost 1" as corner cases
32767.0 / 32768.0, (32767.0 + 0.4) / 32768.0, (32767. + 0.5) / 32768.0,
(32767.0 + 0.6) / 32768.0, (32767.0 + 0.9) / 32768.0,
} ;
static float fneg [] =
{ -0.95, -0.99, -1.0, -1.01, -1.1, -2.0, -11.1, -111.1, -2222.2, -33333.3,
// Some "almost 1" as corner cases
-32767./32768., -(32767. + 0.4)/32768., -(32767. + 0.5)/32768., -(32767. + 0.6)/32768., -(32767. + 0.9)/32768.,
// Some "almost 1" as corner cases
-32767.0 / 32768.0, -(32767.0 + 0.4) / 32768.0, -(32767.0 + 0.5) / 32768.0,
-(32767.0 + 0.6) / 32768.0, -(32767.0 + 0.9) / 32768.0,
} ;

static short out [MAX (ARRAY_LEN (fpos), ARRAY_LEN (fneg))] ;
Expand Down

0 comments on commit 9fb7f43

Please sign in to comment.