testfft.c test fft sin 2 th data [0] real = 0, imag = 0 [1] real = 0.707107, imag = 0 [2] real = 1, imag = 0 [3] real = 0.707107, imag = 0 [4] real = 1.22461e-16, imag = 0 [5] real = -0.707107, imag = 0 [6] real = -1, imag = 0 [7] real = -0.707107, imag = 0 [8] real = -2.44921e-16, imag = 0 [9] real = 0.707107, imag = 0 [10] real = 1, imag = 0 [11] real = 0.707107, imag = 0 [12] real = 3.67382e-16, imag = 0 [13] real = -0.707107, imag = 0 [14] real = -1, imag = 0 [15] real = -0.707107, imag = 0 sin 2 th FFT cos 0 th = -6.43257e-16, sin 0 th = 0 cos 1 th = -8.37856e-16, sin 1 th = 2.12744e-16 cos 2 th = -2.27161e-14, sin 2 th = -8 cos 3 th = 1.11829e-15, sin 3 th = -1.19295e-15 cos 4 th = 2.44921e-16, sin 4 th = 0 cos 5 th = -6.28444e-16, sin 5 th = -7.03108e-16 cos 6 th = 5.21393e-16, sin 6 th = -5.32907e-15 cos 7 th = 1.3277e-15, sin 7 th = -2.77099e-16 cos 8 th = 1.1331e-15, sin 8 th = 0 cos 9 th = 1.3277e-15, sin 9 th = 2.77099e-16 cos 10 th = 7.4295e-15, sin 10 th = -8.88178e-16 cos 11 th = -6.28444e-16, sin 11 th = 7.03108e-16 cos 12 th = 2.44921e-16, sin 12 th = 0 cos 13 th = 1.11829e-15, sin 13 th = 1.19295e-15 cos 14 th = 1.18262e-14, sin 14 th = 8 cos 15 th = -8.37856e-16, sin 15 th = -2.12744e-16 square wave data [0] real = 1, imag = 0 [1] real = 1, imag = 0 [2] real = 1, imag = 0 [3] real = 1, imag = 0 [4] real = 0, imag = 0 [5] real = -1, imag = 0 [6] real = -1, imag = 0 [7] real = -1, imag = 0 [8] real = -1, imag = 0 [9] real = -1, imag = 0 [10] real = -1, imag = 0 [11] real = -1, imag = 0 [12] real = 0, imag = 0 [13] real = 1, imag = 0 [14] real = 1, imag = 0 [15] real = 1, imag = 0 square wave generate [0] real = 1.03526 [1] real = 1.02635 [2] real = 0.997308 [3] real = 0.928841 [4] real = 7.51019e-16 [5] real = -0.928841 [6] real = -0.997308 [7] real = -1.02635 [8] real = -1.03526 [9] real = -1.02635 [10] real = -0.997308 [11] real = -0.928841 [12] real = -2.43612e-15 [13] real = 0.928841 [14] real = 0.997308 [15] real = 1.02635 square wave FFT cos 0 th = 0, sin 0 th = 0 cos 1 th = 10.0547, sin 1 th = -3.58659e-14 cos 2 th = 0, sin 2 th = 0 cos 3 th = -2.99321, sin 3 th = 1.22318e-14 cos 4 th = 0, sin 4 th = 0 cos 5 th = 1.33636, sin 5 th = 2.04036e-15 cos 6 th = 0, sin 6 th = 0 cos 7 th = -0.397825, sin 7 th = 4.08733e-15 cos 8 th = 0, sin 8 th = 0 cos 9 th = -0.397825, sin 9 th = 1.68148e-14 cos 10 th = 0, sin 10 th = 0 cos 11 th = 1.33636, sin 11 th = -2.63662e-15 cos 12 th = 0, sin 12 th = 0 cos 13 th = -2.99321, sin 13 th = 1.70108e-14 cos 14 th = 0, sin 14 th = 0 cos 15 th = 10.0547, sin 15 th = -1.36825e-14 triangle wave data [0] real = 1, imag = 0 [1] real = 0.75, imag = 0 [2] real = 0.5, imag = 0 [3] real = 0.25, imag = 0 [4] real = 0, imag = 0 [5] real = -0.25, imag = 0 [6] real = -0.5, imag = 0 [7] real = -0.75, imag = 0 [8] real = -1, imag = 0 [9] real = -0.75, imag = 0 [10] real = -0.5, imag = 0 [11] real = -0.25, imag = 0 [12] real = 0, imag = 0 [13] real = 0.25, imag = 0 [14] real = 0.5, imag = 0 [15] real = 0.75, imag = 0 triangle wave generate [0] real = 0.977507 [1] real = 0.75159 [2] real = 0.501724 [3] real = 0.250988 [4] real = 8.55373e-18 [5] real = -0.250988 [6] real = -0.501724 [7] real = -0.75159 [8] real = -0.977507 [9] real = -0.75159 [10] real = -0.501724 [11] real = -0.250988 [12] real = -2.57621e-16 [13] real = 0.250988 [14] real = 0.501724 [15] real = 0.75159 triangle wave FFT cos 0 th = 0, sin 0 th = 0 cos 1 th = 6.56854, sin 1 th = -2.07964e-14 cos 2 th = 0, sin 2 th = 0 cos 3 th = 0.809957, sin 3 th = 1.68123e-15 cos 4 th = 0, sin 4 th = 0 cos 5 th = 0.361616, sin 5 th = 5.54707e-15 cos 6 th = 0, sin 6 th = 0 cos 7 th = 0.259892, sin 7 th = 3.0027e-15 cos 8 th = 0, sin 8 th = 0 cos 9 th = 0.259892, sin 9 th = 1.12708e-14 cos 10 th = 0, sin 10 th = 0 cos 11 th = 0.361616, sin 11 th = 3.11636e-15 cos 12 th = 0, sin 12 th = 0 cos 13 th = 0.809957, sin 13 th = 3.97851e-15 cos 14 th = 0, sin 14 th = 0 cos 15 th = 6.56854, sin 15 th = -7.80029e-15 saw tooth wave data [0] real = 0, imag = 0 [1] real = 0.125, imag = 0 [2] real = 0.25, imag = 0 [3] real = 0.375, imag = 0 [4] real = 0.5, imag = 0 [5] real = 0.625, imag = 0 [6] real = 0.75, imag = 0 [7] real = 0.875, imag = 0 [8] real = 0, imag = 0 [9] real = -0.875, imag = 0 [10] real = -0.75, imag = 0 [11] real = -0.625, imag = 0 [12] real = -0.5, imag = 0 [13] real = -0.375, imag = 0 [14] real = -0.25, imag = 0 [15] real = -0.125, imag = 0 sawtooth wave generate [0] real = 0 [1] real = 0.164246 [2] real = 0.384874 [3] real = 0.585512 [4] real = 0.726186 [5] real = 0.915542 [6] real = 1.18216 [7] real = 1.32188 [8] real = 2.59144e-15 [9] real = -1.32188 [10] real = -1.18216 [11] real = -0.915542 [12] real = -0.726186 [13] real = -0.585512 [14] real = -0.384874 [15] real = -0.164246 saw tooth wave FFT cos 0 th = 0, sin 0 th = 0 cos 1 th = -1.99085e-14, sin 1 th = -5.02734 cos 2 th = 6.64692e-15, sin 2 th = 2.41421 cos 3 th = -4.29745e-15, sin 3 th = -1.49661 cos 4 th = 1.75099e-15, sin 4 th = 1 cos 5 th = -5.37493e-16, sin 5 th = -0.668179 cos 6 th = 7.50159e-16, sin 6 th = 0.414214 cos 7 th = -3.77926e-16, sin 7 th = -0.198912 cos 8 th = 0, sin 8 th = 0 cos 9 th = 6.99487e-15, sin 9 th = 0.198912 cos 10 th = -3.19265e-15, sin 10 th = -0.414214 cos 11 th = 2.88794e-15, sin 11 th = 0.668179 cos 12 th = -1.75099e-15, sin 12 th = -1 cos 13 th = 6.98898e-15, sin 13 th = 1.49661 cos 14 th = -4.20443e-15, sin 14 th = -2.41421 cos 15 th = 8.24961e-15, sin 15 th = 5.02734 padded with zeros, must read FFT as 1/2 printed frequency sin 2 th data, bottom half only, top half zeros [0] real = 0, imag = 0 [1] real = 0.707107, imag = 0 [2] real = 1, imag = 0 [3] real = 0.707107, imag = 0 [4] real = 1.22461e-16, imag = 0 [5] real = -0.707107, imag = 0 [6] real = -1, imag = 0 [7] real = -0.707107, imag = 0 [8] real = -2.44921e-16, imag = 0 [9] real = 0.707107, imag = 0 [10] real = 1, imag = 0 [11] real = 0.707107, imag = 0 [12] real = 3.67382e-16, imag = 0 [13] real = -0.707107, imag = 0 [14] real = -1, imag = 0 [15] real = -0.707107, imag = 0 sin 2 th FFT only bottom half cos 0 th = -6.43257e-16, sin 0 th = 0 cos 1 th = 2.58371, sin 1 th = -1.54756e-14 cos 2 th = -8.37856e-16, sin 2 th = 2.12744e-16 cos 3 th = 5.68584, sin 3 th = -2.44227e-14 cos 4 th = -2.21836e-14, sin 4 th = -8 cos 5 th = -4.66625, sin 5 th = 2.21032e-14 cos 6 th = 1.11829e-15, sin 6 th = -1.19295e-15 cos 7 th = -1.38102, sin 7 th = 2.88625e-15 cos 8 th = 2.44921e-16, sin 8 th = 0 cos 9 th = -0.783761, sin 9 th = 4.39007e-15 cos 10 th = -6.28444e-16, sin 10 th = -7.03108e-16 cos 11 th = -0.560006, sin 11 th = 3.88278e-15 cos 12 th = 1.24477e-15, sin 12 th = -5.32907e-15 cos 13 th = -0.459585, sin 13 th = 1.94557e-15 cos 14 th = 1.3277e-15, sin 14 th = -2.77099e-16 cos 15 th = -0.418929, sin 15 th = 9.58268e-16 square wave data bottom half only, top half zeros [0] real = 1, imag = 0 [1] real = 1, imag = 0 [2] real = 1, imag = 0 [3] real = 1, imag = 0 [4] real = 0, imag = 0 [5] real = -1, imag = 0 [6] real = -1, imag = 0 [7] real = -1, imag = 0 [8] real = -1, imag = 0 [9] real = -1, imag = 0 [10] real = -1, imag = 0 [11] real = -1, imag = 0 [12] real = 0, imag = 0 [13] real = 1, imag = 0 [14] real = 1, imag = 0 [15] real = 1, imag = 0 square wave generate [0] real = 1.03526 [1] real = 1.02635 [2] real = 0.997308 [3] real = 0.928841 [4] real = 7.51019e-16 [5] real = -0.928841 [6] real = -0.997308 [7] real = -1.02635 [8] real = -1.03526 [9] real = -1.02635 [10] real = -0.997308 [11] real = -0.928841 [12] real = -2.43612e-15 [13] real = 0.928841 [14] real = 0.997308 [15] real = 1.02635 square wave FFT bottom half only cos 0 th = 0, sin 0 th = 0 cos 1 th = 1, sin 1 th = 4.20558 cos 2 th = 10.0547, sin 2 th = -3.59086e-14 cos 3 th = 1, sin 3 th = -7.9586 cos 4 th = 0, sin 4 th = 0 cos 5 th = 1, sin 5 th = -4.51668 cos 6 th = -2.99321, sin 6 th = 1.26331e-14 cos 7 th = 1, sin 7 th = 0.504721 cos 8 th = 0, sin 8 th = 0 cos 9 th = 1, sin 9 th = 0.339936 cos 10 th = 1.33636, sin 10 th = 3.29993e-15 cos 11 th = 1, sin 11 th = -1.29042 cos 12 th = 0, sin 12 th = 0 cos 13 th = 1, sin 13 th = -0.732344 cos 14 th = -0.397825, sin 14 th = 3.66233e-15 cos 15 th = 1, sin 15 th = 0.0407965