pfft 0.1
jerro
a at a.com
Sat Jul 21 20:01:51 PDT 2012
> I think that poor precision is a problem. I have checked now and
> std.numeric.Fft does indeed use floats for the lookup table.
> The precision problem could be solved by either changing that to
> real or by changing Fft to a template and using whatever the
> type
> parameter is. Just changing float to real doesn't require
> changing
> the API, but would probably result in worse performance.
I forgot to mention one more solution (the one that pfft.stdapi
currently uses). The class could also use lazy initialization.
When the fft is called, check if the lookup table for that type
is already created, create it if it isn't, store it for later and
then compute the fft. This would require casting away const in
the fft() method, though.
More information about the Digitalmars-d-announce
mailing list