<p dir="auto">If there is interest, I could provide an FFT library implemented in C99 that is based on fftpack, but falls back to Bluestein's algorithm for near-prime lengths. Accuracy should also be better than the original fftpack.</p>
<p dir="auto">You can have a look at the code at <a href="https://gitlab.mpcdf.mpg.de/mtr/pocketfft" rel="nofollow">https://gitlab.mpcdf.mpg.de/mtr/pocketfft</a></p>
<p dir="auto">I can contribute this under the 3-clause BSD license, but I haven't added the necessary file headers yet.</p>
<p dir="auto">I thought we had an issue open for this but cannot find it now. Occasionally, CI jobs fail like <a href="https://github.com/numpy/numpy/runs/2014687899?check_suite_focus=true#step:4:3128">this one</a> with</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="gcc: build/src.linux-x86_64-3.7/numpy/core/src/multiarray/einsum_sumprod.c
during IPA pass: profile
numpy/core/src/multiarray/einsum_sumprod.c.src: In function ‘longdouble_sum_of_products_contig_three’:
numpy/core/src/multiarray/einsum_sumprod.c.src:1264:1: internal compiler error: in coverage_begin_function, at coverage.c:656
 1264 | }
      | ^
Please submit a full bug report,
with preprocessed source if appropriate.
See &lt;file:///usr/share/doc/gcc-9/README.Bugs&gt; for instructions."><pre class="notranslate"><code class="notranslate">gcc: build/src.linux-x86_64-3.7/numpy/core/src/multiarray/einsum_sumprod.c
during IPA pass: profile
numpy/core/src/multiarray/einsum_sumprod.c.src: In function ‘longdouble_sum_of_products_contig_three’:
numpy/core/src/multiarray/einsum_sumprod.c.src:1264:1: internal compiler error: in coverage_begin_function, at coverage.c:656
 1264 | }
      | ^
Please submit a full bug report,
with preprocessed source if appropriate.
See &lt;file:///usr/share/doc/gcc-9/README.Bugs&gt; for instructions.
</code></pre></div>
<p dir="auto">Note it is in the coverage compilation of the generated code, in the "full" CI run with <a href="https://github.com/numpy/numpy/runs/2014687899?check_suite_focus=true#step:4:22">gcc 9.3.0</a></p>