We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f690fd3 commit c0761d2Copy full SHA for c0761d2
tests/perf_bench/bm_fft.py
@@ -15,7 +15,7 @@ def reverse(x, bits):
15
16
# Initialization
17
n = len(vector)
18
- levels = int(math.log2(n))
+ levels = int(math.log(n) / math.log(2))
19
coef = (2 if inverse else -2) * cmath.pi / n
20
exptable = [cmath.rect(1, i * coef) for i in range(n // 2)]
21
vector = [vector[reverse(i, levels)] for i in range(n)] # Copy with bit-reversed permutation
0 commit comments