Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
f2cl
f2cl
Commits
425fa53d
Commit
425fa53d
authored
Sep 17, 2020
by
Raymond Toy
Browse files
Fix to handle odd FFT lengths
parent
284a108b
Changes
1
Hide whitespace changes
Inline
Side-by-side
packages/fftpack51/fftpack51.lisp
View file @
425fa53d
...
...
@@ -80,10 +80,11 @@
(
nhalf
(
floor
(
/
n
2
)))
(
out
(
make-array
(
+
1
nhalf
)
:element-type
'
(
complex
single-float
))))
(
setf
(
aref
out
0
)
(
complex
(
aref
x
0
)
0.0
))
(
loop
for
j
from
1
to
(
1-
nhalf
)
(
loop
for
j
from
1
to
(
if
(
evenp
n
)
(
1-
nhalf
)
nhalf
)
for
k
from
1
by
2
do
(
setf
(
aref
out
j
)
(
complex
(
*
0.5
(
aref
x
(
1-
(
*
2
j
))
))
(
*
0.5
(
aref
x
(
*
2
j
))))))
(
setf
(
aref
out
j
)
(
complex
(
*
0.5
(
aref
x
k
))
(
*
0.5
(
aref
x
(
1+
k
))))))
(
when
(
evenp
n
)
(
setf
(
aref
out
nhalf
)
(
complex
(
aref
x
(
1-
n
))
0.0
)))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment