git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
23e994c
)
tests/checkasm/checkasm: Provide verbose failure information on float_near_abs_eps...
author
Michael Niedermayer
<michael@niedermayer.cc>
Fri, 13 Apr 2018 00:34:01 +0000
(
02:34
+0200)
committer
Michael Niedermayer
<michael@niedermayer.cc>
Sat, 14 Apr 2018 13:54:06 +0000
(15:54 +0200)
This will make understanding failures and adjusting EPS easier
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tests/checkasm/checkasm.c
patch
|
blob
|
history
diff --git
a/tests/checkasm/checkasm.c
b/tests/checkasm/checkasm.c
index
20ce569
..
ba1d1d0
100644
(file)
--- 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,