]> git.sesse.net Git - ffmpeg/blobdiff - tests/checkasm/float_dsp.c
Merge commit '7993ec19af394fdc58ec64165bc0b12619543a5d'
[ffmpeg] / tests / checkasm / float_dsp.c
index 9b0a221c25d2ccd6338f30a946bb375eb1cd51a0..2f999a3162571d3cacc5ccb007d3637c018a07d0 100644 (file)
@@ -165,7 +165,8 @@ static void test_vector_dmul_scalar(const double *src0, const double *src1)
     call_ref(cdst, src0, src1[0], LEN);
     call_new(odst, src0, src1[0], LEN);
     for (i = 0; i < LEN; i++) {
-        if (!double_near_abs_eps(cdst[i], odst[i], DBL_EPSILON)) {
+        double t = fabs(src1[0]) + fabs(src0[i]) + fabs(src1[0] * src0[i]) + 1.0;
+        if (!double_near_abs_eps(cdst[i], odst[i], t * 2 * DBL_EPSILON)) {
             fprintf(stderr, "%d: %- .12f - %- .12f = % .12g\n", i,
                     cdst[i], odst[i], cdst[i] - odst[i]);
             fail();