1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

tests/checkasm/checkasm: Provide verbose failure information on float_near_abs_eps() failures

This will make understanding failures and adjusting EPS easier

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2018-04-13 02:34:01 +02:00
parent 23e994ca49
commit 18d6ff2b42

View File

@ -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,