public void testFFTInverse()
        {
            List <Complex> x = new InitializedList <Complex>(3);

            x[0] = 1;
            x[1] = 2;
            x[2] = 3;

            int order = FastFourierTransform.min_order(x.Count) + 1;
            FastFourierTransform fft = new FastFourierTransform(order);

            int            nFrq = fft.output_size();
            List <Complex> ft   = new InitializedList <Complex>(nFrq);
            List <Complex> tmp  = new InitializedList <Complex>(nFrq);
            Complex        z    = new Complex();

            fft.inverse_transform(x, 0, 3, ft);
            for (int i = 0; i < nFrq; ++i)
            {
                tmp[i] = Math.Pow(ft[i].Magnitude, 2.0);
                ft[i]  = z;
            }

            fft.inverse_transform(tmp, 0, tmp.Count, ft);

            // 0
            double calculated = ft[0].Real / nFrq;
            double expected   = (x[0] * x[0] + x[1] * x[1] + x[2] * x[2]).Real;

            if (Math.Abs(calculated - expected) > 1.0e-10)
            {
                QAssert.Fail("Convolution(0)\n"
                             + "    calculated: " + calculated + "\n"
                             + "    expected:   " + expected);
            }

            // 1
            calculated = ft[1].Real / nFrq;
            expected   = (x[0] * x[1] + x[1] * x[2]).Real;
            if (Math.Abs(calculated - expected) > 1.0e-10)
            {
                QAssert.Fail("Convolution(1)\n"
                             + "    calculated: " + calculated + "\n"
                             + "    expected:   " + expected);
            }

            // 2
            calculated = ft[2].Real / nFrq;
            expected   = (x[0] * x[2]).Real;
            if (Math.Abs(calculated - expected) > 1.0e-10)
            {
                QAssert.Fail("Convolution(1)\n"
                             + "    calculated: " + calculated + "\n"
                             + "    expected:   " + expected);
            }
        }