From c0761d28fc46072d73daf6bdd1c6abbbac0fc9c1 Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 13 Sep 2021 18:27:39 +1000 Subject: [PATCH] tests/perf_bench: Use math.log instead of math.log2. So MICROPY_PY_MATH_SPECIAL_FUNCTIONS is not needed for these performance tests. Signed-off-by: Damien George --- tests/perf_bench/bm_fft.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/perf_bench/bm_fft.py b/tests/perf_bench/bm_fft.py index fb79a9fd28..9a2d03d11b 100644 --- a/tests/perf_bench/bm_fft.py +++ b/tests/perf_bench/bm_fft.py @@ -15,7 +15,7 @@ def transform_radix2(vector, inverse): # Initialization n = len(vector) - levels = int(math.log2(n)) + levels = int(math.log(n) / math.log(2)) coef = (2 if inverse else -2) * cmath.pi / n exptable = [cmath.rect(1, i * coef) for i in range(n // 2)] vector = [vector[reverse(i, levels)] for i in range(n)] # Copy with bit-reversed permutation