Skip to content

Commit c0761d2

Browse files
committed
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 <[email protected]>
1 parent f690fd3 commit c0761d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/perf_bench/bm_fft.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def reverse(x, bits):
1515

1616
# Initialization
1717
n = len(vector)
18-
levels = int(math.log2(n))
18+
levels = int(math.log(n) / math.log(2))
1919
coef = (2 if inverse else -2) * cmath.pi / n
2020
exptable = [cmath.rect(1, i * coef) for i in range(n // 2)]
2121
vector = [vector[reverse(i, levels)] for i in range(n)] # Copy with bit-reversed permutation

0 commit comments

Comments
 (0)