Skip to content

Commit 962630a

Browse files
Update radix2_fft.py
1 parent 6bc5bde commit 962630a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

maths/radix2_fft.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ class FFT:
3939
>>> x = FFT(A, B)
4040
4141
Print product
42-
>>> x.product # 2x + 3x^2 + 8x^3 + 4x^4 + 6x^5
42+
>>> x.product # 2x + 3x^2 + 8x^3 + 6x^4 + 8x^5
4343
[(-0-0j), (2+0j), (3-0j), (8-0j), (6+0j), (8+0j)]
4444
4545
__str__ test
4646
>>> print(x)
47-
A = 0*x^0 + 1*x^1 + 2*x^0 + 3*x^2
48-
B = 0*x^2 + 1*x^3 + 2*x^4
49-
A*B = 0*x^(-0-0j) + 1*x^(2+0j) + 2*x^(3-0j) + 3*x^(8-0j) + 4*x^(6+0j) + 5*x^(8+0j)
47+
A = 0*x^0 + 1*x^1 + 0*x^2 + 2*x^3
48+
B = 2*x^0 + 3*x^1 + 4*x^2
49+
A*B = (-0-0j)*x^0 + (2+0j)*x^1 + (3-0j)*x^2 + (8-0j)*x^3 + (6+0j)*x^4 + (8+0j)*x^5
5050
"""
5151

5252
def __init__(self, poly_a=None, poly_b=None):
@@ -176,3 +176,4 @@ def __str__(self):
176176
import doctest
177177

178178
doctest.testmod()
179+

0 commit comments

Comments
 (0)