Added DFT reference and PrettyDouble, for easier viewing.
Added DFT reference and PrettyDouble, for easier viewing.

Here is the current output:

  :!./fft_test

  Testing input: [ 1.000 :+  0.000, 0.000 :+  0.000, 0.000 :+  0.000,
  0.000 :+  0.000]
  Expected output: [ 1.000 :+  0.000, 1.000 :+  0.000, 1.000 :+  0.000,
  1.000 :+  0.000]
  Actual output:   B (B (L ( 1.000 :+  0.000) :# L ( 1.000 :+  0.000)) :#
  B (L ( 1.000 :+  0.000) :# L ( 1.000 :+  0.000)))

  Testing input: [ 1.000 :+  0.000, 1.000 :+  0.000, 1.000 :+  0.000,
  1.000 :+  0.000]
  Expected output: [ 4.000 :+  0.000, 0.000 :+  0.000, 0.000 :+  0.000,
  0.000 :+  0.000]
  Actual output:   B (B (L ( 0.000 :+  0.000) :# L ( 0.000 :+  0.000)) :#
  B (L ( 0.000 :+  0.000) :# L ( 4.000 :+  0.000)))

  Testing input: [ 1.000 :+  0.000,-1.000 :+  0.000, 1.000 :+
  0.000,-1.000 :+  0.000]
  Expected output: [ 0.000 :+  0.000, 0.000 :+  0.000, 4.000 :+  0.000,
  0.000 :+  0.000]
  Actual output:   B (B (L ( 0.000 :+  0.000) :# L ( 0.000 :+  0.000)) :#
  B (L ( 4.000 :+  0.000) :# L ( 0.000 :+  0.000)))

  Testing input: [ 1.000 :+  0.000, 0.000 :+  0.000,-1.000 :+  0.000,
  0.000 :+  0.000]
  Expected output: [ 0.000 :+  0.000, 2.000 :+  0.000, 0.000 :+  0.000,
  2.000 :+  0.000]
  Actual output:   B (B (L ( 2.000 :+  0.000) :# L ( 2.000 :+  0.000)) :#
  B (L ( 0.000 :+  0.000) :# L ( 0.000 :+  0.000)))

  Testing input: [ 0.000 :+  0.000, 1.000 :+  0.000, 0.000 :+
  0.000,-1.000 :+  0.000]
  Expected output: [ 0.000 :+  0.000, 0.000 :+ -2.000, 0.000 :+  0.000,
  0.000 :+  2.000]
  Actual output:   B (B (L (-2.000 :+  0.000) :# L ( 2.000 :+  0.000)) :#
  B (L ( 0.000 :+  0.000) :# L ( 0.000 :+  0.000)))

As can be seen, above, there is more wrong than just a swap of the first
and last output elements. The last case, for instance, is completely
missing the 90-deg. phase shift, in both non-zero output elements.

conal/lambda-ccc,capn-freako/lambda-ccc