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>
This commit is contained in:
Damien George 2021-09-13 18:27:39 +10:00
parent f690fd3a47
commit c0761d28fc
1 changed files with 1 additions and 1 deletions

View File

@ -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