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 <damien@micropython.org>
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy