• Martin Storsjö's avatar
    dnn-layer-mathbinary-test: Fix tests for cases with extra intermediate precision · f4d8fad8
    Martin Storsjö authored
    This fixes tests on 32 bit x86 mingw with clang, which uses x87
    fpu by default.
    
    In this setup, while the get_expected function is declared to
    return float, the compiler is (especially given the optimization
    flags set) free to keep the intermediate values (in this case,
    the return value from the inlined function) in higher precision.
    
    This results in the situation where 7.28 (which actually, as
    a float, ends up as 7.2800002098), multiplied by 100, is
    728.000000 when really forced into a 32 bit float, but 728.000021
    when kept with higher intermediate precision.
    
    For the multiplication case, a more suitable epsilon would e.g.
    be 2*FLT_EPSILON*fabs(expected_output), but just increase the
    current hardcoded threshold for now.
    Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
    f4d8fad8
Name
Last commit
Last update
..
api Loading commit data...
checkasm Loading commit data...
dnn Loading commit data...
fate Loading commit data...
filtergraphs Loading commit data...
ref Loading commit data...
.gitignore Loading commit data...
Makefile Loading commit data...
audiogen.c Loading commit data...
audiomatch.c Loading commit data...
base64.c Loading commit data...
copycooker.sh Loading commit data...
extended.ffconcat Loading commit data...
fate-run.sh Loading commit data...
fate-valgrind.supp Loading commit data...
fate.sh Loading commit data...
md5.sh Loading commit data...
refcmp-metadata.awk Loading commit data...
reference.pnm Loading commit data...
rotozoom.c Loading commit data...
simple1.ffconcat Loading commit data...
simple2.ffconcat Loading commit data...
test.ffmeta Loading commit data...
tiny_psnr.c Loading commit data...
tiny_ssim.c Loading commit data...
utils.c Loading commit data...
videogen.c Loading commit data...