summaryrefslogtreecommitdiffstats
path: root/tests/checkasm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/checkasm')
-rw-r--r--tests/checkasm/checkasm.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c
index 20ce569..ba1d1d0 100644
--- a/tests/checkasm/checkasm.c
+++ b/tests/checkasm/checkasm.c
@@ -294,8 +294,12 @@ int float_near_ulp_array(const float *a, const float *b, unsigned max_ulp,
int float_near_abs_eps(float a, float b, float eps)
{
float abs_diff = fabsf(a - b);
+ if (abs_diff < eps)
+ return 1;
- return abs_diff < eps;
+ fprintf(stderr, "test failed comparing %g with %g (abs diff=%g with EPS=%g)\n", a, b, abs_diff, eps);
+
+ return 0;
}
int float_near_abs_eps_array(const float *a, const float *b, float eps,
OpenPOWER on IntegriCloud