?iga Lenar?i? wrote:
>
> Attached are fft.lisp and fft.lisp.patch.
Finally got around to look at this. For the most part, I think it's
ok. A couple of comments.
(defun fft-arrays->mlist (realparts imagparts)
"Takes two Lisp arrays with real and imaginary
parts and returns a Maxima list of complex numbers
in Maxima's 'format'."
(let (ans)
(dotimes (i (length realparts))
(push `((mplus) ,(aref realparts i) ((mtimes) $%i ,(aref imagparts
i)))
ans))
(cons '(mlist) (nreverse ans))))
I think the push expression is probably better written using mul and add
instead of using maxima's internal representation. Probably doesn't
matter in this case since realparts and imagparts are float numbers, so
no simplification would be done.
We should be use your suggestion about using flonum everywhere. You
didn't do that in your version.
I haven't tested this yet, but it looks ok.
Ray