tim-janik / beast

Beast - Music Synthesizer and Composer
GNU Lesser General Public License v2.1
84 stars 12 forks source link

Resampler accuracy tests fail #139

Closed tim-janik closed 4 years ago

tim-janik commented 4 years ago

Since we enabled -ffast-math, resampler accuracy tests have been failing. Just build todays Beats master and run the checks:

out/tests/suite1 testresampler_check_precision_sub24
  RUN…     testresampler_check_precision_sub24
suite1: tests/testresampler.cc:810: testresampler_check_precision_sub24: assertion failed: run_accuracy (RES_SUBSAMPLE, false, 24, 90, 9000, 983, 126)

Maybe the error margins need to be extended, now that math precision can potentially be reduced, or maybe some float instructions really need adaptions. In particular -fassociative-math and -freciprocal-math may be the culprits here. See also: https://mail.gnome.org/archives/beast/2020-January/msg00009.html

tim-janik commented 4 years ago

Since we enabled -ffast-math, resampler accuracy tests have been failing. Just build todays Beats master and run the checks:

Note, for the test to fail, the build mode must be MODE=production, debug mode in particular doesn't trigger it, probably because of the lack of compiler optimizations in it.

Also, couldn't reproduce this with g++-8 or g++-9, only fails with clang++-9 so far.