Discrete sine transform from a sign-modulated discrete cosine transform (source code)

= Discrete sine transform from a sign-modulated discrete cosine transform

If $\xi_n=(-1)^nx_n$ and $C_j(\xi)$ is its type-II cosine transform, then
$$
\widetilde Z_k=C_{N-1-k}(\xi).
$$
Thus a sign modulation, one fast cosine transform, and output reversal give an $O(N\log N)$ sine-transform algorithm.