From 663e3dd8a23dbf8eb59d25ec3bd9a17cf2a819f6 Mon Sep 17 00:00:00 2001 From: Antoine SOULIER Date: Mon, 25 Jul 2022 15:38:20 +0200 Subject: [PATCH] test: Enable fast-math on tests, and increase tolerance with SNS checks --- test/setup.py | 2 +- test/sns.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/setup.py b/test/setup.py index 40fb6f1..7cbcc4a 100755 --- a/test/setup.py +++ b/test/setup.py @@ -37,7 +37,7 @@ depends = [ 'ctypes.h' ] + \ includes = [ SRC_DIR, INC_DIR ] extension = Extension('lc3', - extra_compile_args = ['-std=c11'], + extra_compile_args = [ '-std=c11', '-ffast-math' ], define_macros = [ ('NPY_NO_DEPRECATED_API', 'NPY_1_7_API_VERSION') ], sources = sources, depends = depends, diff --git a/test/sns.py b/test/sns.py index 1c4e54d..7447c99 100644 --- a/test/sns.py +++ b/test/sns.py @@ -506,7 +506,7 @@ def check_synthesis(rng, dt, sr): y = synthesis.run(x) y_c = lc3.sns_synthesize(dt, sr, synthesis.get_data(), x) - ok = ok and np.amax(np.abs(y - y_c)) < 1e0 + ok = ok and np.amax(np.abs(y - y_c)) < 2e0 return ok