You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All real literals in fftpack.c are double precision such as 2.0 or 1.0, except in 4 different instances we have .5f instead which is a bit odd.
Also in case anyone is interested, since I needed to be able to do both float and double FFTs in the same program I took fftpack.c, branched it into fftpack_float.c and fftpack_double.c, removed fft_real_t, removed the c__1 and c__2 globals (I put them inside the functions that need them instead to avoid having the same globals declared twice), removed everything related to the complex keyword and the other pointless macros, replaced fft_complex_t with fft_complexf_t / fft_complexd_t, then for the single precision version I converted the trigonometry function calls and the literals to single precision, and minor things like using the value of pi instead of calculating it from atan, made separate header guards, gave function names suffixes, all so that you can include both fftpack_float.c and fftpack_double.c in the same C file as I did here without conflict.
The text was updated successfully, but these errors were encountered:
All real literals in fftpack.c are double precision such as
2.0
or1.0
, except in 4 different instances we have.5f
instead which is a bit odd.Also in case anyone is interested, since I needed to be able to do both float and double FFTs in the same program I took fftpack.c, branched it into fftpack_float.c and fftpack_double.c, removed
fft_real_t
, removed thec__1
andc__2
globals (I put them inside the functions that need them instead to avoid having the same globals declared twice), removed everything related to thecomplex
keyword and the other pointless macros, replacedfft_complex_t
withfft_complexf_t
/fft_complexd_t
, then for the single precision version I converted the trigonometry function calls and the literals to single precision, and minor things like using the value of pi instead of calculating it from atan, made separate header guards, gave function names suffixes, all so that you can include bothfftpack_float.c
andfftpack_double.c
in the same C file as I did here without conflict.The text was updated successfully, but these errors were encountered: