ehrt74/dart_lang_fft

Replace my_complex with complex package.

Closed this issue · 6 comments

Hi. I was just wondering if you would consider to replace the my_complex dependency with the package complex.
The advantage is that it is very well documented.

Hi! I haven't done any Dart development in years. If you want to make the change yourself and issue a pull request, i'll accept it. Alternatively I might get the chance to move to the complex package sometime during the week.

If I get around to it I'll do it. But I don't think I'll have time. I am using your library for a side project so it does not have a high priority for me.

Hi! I've just had a look at the complex package. A couple of things worry me about it. It seems to store all complex numbers as cartesians which makes certain operations (rotation, potentiation, multiplication, division) a lot slower in some cases. I'm not sure changing to the library would be a good idea for performance.

Also, because it only uses the cartesian form internally, accuracy is lost during rotation.

Sorry I don't have any experience with fft. Does it require much more rotations (multiplications) than translations (additions)?

There's a mix of both. My complex library works by having two sub-classes of complex (polar and cartesian) and then transforming between them as needed using double dispatch. This adds calling overhead, but does make some operations faster.

So one would have to profile some use cases to actually know?