English

Dual-Select FMA Butterfly for FFT: Eliminating Twiddle Factor Singularities with Bounded Precomputed Ratios

Performance 2026-04-02 v1

Abstract

The fused multiply-add (FMA) instruction enables the radix-2 FFT butterfly to be computed in 6~FMA operations -- the proven minimum. The classical factorization by Linzer and Feig~\cite{linzer1993} precomputes the ratio cotθ=cosθ/sinθ\cot\theta = \cos\theta/\sin\theta, which is singular when the twiddle factor is W0=1W^0 = 1 (i.e., sinθ=0\sin\theta = 0). Standard practice clamps sinθ\sin\theta to a small epsilon, degrading numerical precision. We observe that an alternative factorization using cosθ\cos\theta as the outer multiplier (precomputing tanθ\tan\theta) avoids this particular singularity but introduces a new one at WN/4W^{N/4}. We then propose a \emph{dual-select} strategy that chooses, per twiddle factor, whichever factorization yields ratio1|\text{ratio}| \leq 1. This eliminates all singularities, requires no epsilon clamping, and bounds the precomputed ratio to unity for all twiddle factors. For N=1024N = 1024, the worst-case ratio drops from 163 (Linzer-Feig) to exactly~1.0 (dual-select), yielding a 235×235\times tighter error bound in FP16 arithmetic over 10~FFT passes. The strategy adds zero computational overhead -- only the precomputed twiddle table changes.

Keywords

Cite

@article{arxiv.2604.00567,
  title  = {Dual-Select FMA Butterfly for FFT: Eliminating Twiddle Factor Singularities with Bounded Precomputed Ratios},
  author = {Mohamed Amine Bergach},
  journal= {arXiv preprint arXiv:2604.00567},
  year   = {2026}
}
R2 v1 2026-07-01T11:47:45.678Z