X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=tests%2Fcheckasm%2Ffloat_dsp.c;h=2f999a3162571d3cacc5ccb007d3637c018a07d0;hb=dd1ecf093c0fbcfbb466faec92c51055ca1d4d2d;hp=9b0a221c25d2ccd6338f30a946bb375eb1cd51a0;hpb=4251e25272d6a51433805956ea26425d7ccd74cb;p=ffmpeg diff --git a/tests/checkasm/float_dsp.c b/tests/checkasm/float_dsp.c index 9b0a221c25d..2f999a31625 100644 --- a/tests/checkasm/float_dsp.c +++ b/tests/checkasm/float_dsp.c @@ -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();