diff options
| author | Damien George <damien@micropython.org> | 2021-09-13 18:27:39 +1000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2021-09-13 18:27:39 +1000 |
| commit | c0761d28fc46072d73daf6bdd1c6abbbac0fc9c1 (patch) | |
| tree | 698c8b1256d2b2f7a42d98b7fc589ef0f74c3da3 | |
| parent | f690fd3a47d493e2c30829e06502ca7b3e787fff (diff) | |
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 <damien@micropython.org>
| -rw-r--r-- | tests/perf_bench/bm_fft.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/perf_bench/bm_fft.py b/tests/perf_bench/bm_fft.py index fb79a9fd2..9a2d03d11 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 |
