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>
pull/7783/head
Damien George 2021-09-13 18:27:39 +10:00
rodzic f690fd3a47
commit c0761d28fc
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

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