Skip to content

Commit

Permalink
compare float values with epsilon
Browse files Browse the repository at this point in the history
  • Loading branch information
AlysonStahl-NOAA committed Sep 23, 2024
1 parent 95d07a7 commit 2286b61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/tst_aec.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ main()
for (i = 0; i < DATA_LEN; i++)
{
/* printf("%g %g\n", fld[i], fld_in[i]); */
if (fld[i] != fld_in[i])
if (abs(fld[i] - fld_in[i]) >= EPSILON)
return G2C_ERROR;
}
}
Expand Down

0 comments on commit 2286b61

Please sign in to comment.