Add doctest test hook
Factor out truncated IFFT
Add doctests for ceil_pow_2