ENH: FFT inversion test and alternative + better S implementation