3 ms·
I'm not familiar with the domain, but is there a particular reason for using floating-point numbers other than that they have faster hardware support? It is no
by moonchild 3y ago
I'm not familiar with the domain, but is there a particular reason for using floating-point numbers other than that they have faster hardware support? It is not hard to synthesise a fast integer multiply from a float fma, and then the rest of the algorithm can be phrased in terms of that.
- cperciva 3y agoDoing an FFT with integer math means doing it in a ring -- and thus dealing with modular reduction. Using complex floating-point math the "modular reduction" comes for free thanks to w^N=1. I would have to write some code to confirm which is faster today -- especially if you choose rings which make the modular reduction easier -- but CPUs have typically optimized FP math more for throughout than integer math, since mostly-integer code has more unpredictable branches and less ILP than FP-heavy code.