//
// Created by lujun on 19-6-28.
//
// This contains SIN_COS , clarke, inv_clarke, park, inv_park and pid
// each one has it's own function.
// All function can be found in main function.
// If you don't want to use it, then comment it.
#include "../common.h"
#include "riscv_common_tables.h"
#include "riscv_const_structs.h"
#include "riscv_math.h"
#include <stdint.h>

#include "../HelperFunctions/math_helper.c"
#include "../HelperFunctions/ref_helper.c"

#include <stdio.h>
#define DELTAF32 (0.05f)
#define DELTAQ31 (63)
#define DELTAQ15 (1)
#define DELTAQ7 (1)

int test_flag_error = 0;

uint32_t fftSize = 1024;
uint32_t ifftFlag = 0;
uint32_t doBitReverse = 1;

static int DSP_cfft_f32(void)
{
    uint16_t i;
    float32_t cfft_testinput_f32_50hz_200Hz[1024] = {
        2.00000000000000,      0.00000000000000,      1.26007351067010,
        1.26007351067010,      1.11022302462516e-16,  1.17557050458495,
        -0.221231742082474,    0.221231742082474,     0.618033988749895,
        -1.11022302462516e-16, 1.00000000000000,      1.00000000000000,
        -7.21644966006352e-16, 1.90211303259031,      -1.39680224666742,
        1.39680224666742,      -1.61803398874990,     4.44089209850063e-16,
        -0.642039521920207,    -0.642039521920206,    0.00000000000000,
        -3.67394039744206e-16, -0.642039521920206,    0.642039521920206,
        -1.61803398874990,     -1.22124532708767e-15, -1.39680224666742,
        -1.39680224666742,     -7.77156117237610e-16, -1.90211303259031,
        1.00000000000000,      -1.00000000000000,     0.618033988749895,
        -3.33066907387547e-16, -0.221231742082475,    -0.221231742082476,
        -5.55111512312578e-16, -1.17557050458495,     1.26007351067010,
        -1.26007351067010,     2.00000000000000,      -1.22464679914735e-15,
        1.26007351067010,      1.26007351067010,      7.77156117237610e-16,
        1.17557050458495,      -0.221231742082475,    0.221231742082475,
        0.618033988749897,     8.88178419700125e-16,  0.999999999999999,
        1.00000000000000,      1.49880108324396e-15,  1.90211303259031,
        -1.39680224666742,     1.39680224666742,      -1.61803398874990,
        1.33226762955019e-15,  -0.642039521920207,    -0.642039521920206,
        0.00000000000000,      -1.10218211923262e-15, -0.642039521920205,
        0.642039521920206,     -1.61803398874989,     1.55431223447522e-15,
        -1.39680224666742,     -1.39680224666743,     6.49480469405717e-15,
        -1.90211303259031,     1.00000000000000,      -0.999999999999995,
        0.618033988749896,     -7.77156117237610e-16, -0.221231742082474,
        -0.221231742082473,    -1.44328993201270e-15, -1.17557050458495,
        1.26007351067010,      -1.26007351067010,     2.00000000000000,
        -2.44929359829471e-15, 1.26007351067010,      1.26007351067010,
        -3.77475828372553e-15, 1.17557050458494,      -0.221231742082475,
        0.221231742082476,     0.618033988749893,     -7.77156117237610e-16,
        1.00000000000000,      0.999999999999998,     2.66453525910038e-15,
        1.90211303259031,      -1.39680224666742,     1.39680224666742,
        -1.61803398874989,     -4.88498130835069e-15, -0.642039521920202,
        -0.642039521920206,    0.00000000000000,      3.49210031947972e-15,
        -0.642039521920198,    0.642039521920206,     -1.61803398874989,
        2.55351295663786e-15,  -1.39680224666742,     -1.39680224666742,
        -3.16413562018170e-15, -1.90211303259031,     1.00000000000000,
        -0.999999999999996,    0.618033988749897,     -9.99200722162641e-16,
        -0.221231742082476,    -0.221231742082477,    -2.10942374678780e-15,
        -1.17557050458494,     1.26007351067009,      -1.26007351067011,
        2.00000000000000,      -3.67394039744206e-15, 1.26007351067010,
        1.26007351067010,      2.22044604925031e-15,  1.17557050458495,
        -0.221231742082473,    0.221231742082472,     0.618033988749893,
        -1.22124532708767e-15, 0.999999999999999,     1.00000000000000,
        -1.31006316905768e-14, 1.90211303259031,      -1.39680224666742,
        1.39680224666742,      -1.61803398874989,     -1.09912079437891e-14,
        -0.642039521920203,    -0.642039521920206,    0.00000000000000,
        8.08638275819206e-15,  -0.642039521920197,    0.642039521920205,
        -1.61803398874989,     3.55271367880050e-15,  -1.39680224666743,
        -1.39680224666741,     -4.32986979603811e-15, -1.90211303259031,
        1.00000000000000,      -0.999999999999997,    0.618033988749898,
        -1.44328993201270e-15, -0.221231742082476,    -0.221231742082476,
        -2.77555756156289e-15, -1.17557050458494,     1.26007351067010,
        -1.26007351067010,     2.00000000000000,      -4.89858719658941e-15,
        1.26007351067010,      1.26007351067010,      -7.54951656745106e-15,
        1.17557050458494,      -0.221231742082473,    0.221231742082472,
        0.618033988749902,     3.88578058618805e-15,  0.999999999999999,
        1.00000000000000,      5.05151476204446e-15,  1.90211303259031,
        -1.39680224666741,     1.39680224666743,      -1.61803398874990,
        4.44089209850063e-15,  -0.642039521920216,    -0.642039521920207,
        0.00000000000000,      -3.30654635769785e-15, -0.642039521920209,
        0.642039521920206,     -1.61803398874989,     4.55191440096314e-15,
        -1.39680224666742,     -1.39680224666742,     -5.44009282066327e-15,
        -1.90211303259031,     1.00000000000000,      -0.999999999999998,
        0.618033988749888,     3.66373598126302e-15,  -0.221231742082475,
        -0.221231742082476,    6.88338275267597e-15,  -1.17557050458495,
        1.26007351067010,      -1.26007351067010,     2.00000000000000,
        1.16403343982657e-14,  1.26007351067010,      1.26007351067010,
        1.40998324127395e-14,  1.17557050458496,      -0.221231742082479,
        0.221231742082482,     0.618033988749891,     -1.99840144432528e-15,
        1.00000000000000,      1.00000000000000,      -1.07136521876328e-14,
        1.90211303259031,      -1.39680224666741,     1.39680224666743,
        -1.61803398874990,     5.44009282066327e-15,  -0.642039521920205,
        -0.642039521920206,    0.00000000000000,      6.61680659921524e-15,
        -0.642039521920220,    0.642039521920207,     -1.61803398874989,
        5.55111512312578e-15,  -1.39680224666742,     -1.39680224666742,
        1.02140518265514e-14,  -1.90211303259031,     1.00000000000000,
        -0.999999999999984,    0.618033988749899,     -2.10942374678780e-15,
        -0.221231742082475,    -0.221231742082475,    -1.47659662275146e-14,
        -1.17557050458493,     1.26007351067009,      -1.26007351067011,
        2.00000000000000,      -7.34788079488412e-15, 1.26007351067010,
        1.26007351067010,      -5.99520433297585e-15, 1.17557050458494,
        -0.221231742082479,    0.221231742082483,     0.618033988749891,
        -2.33146835171283e-15, 1.00000000000000,      1.00000000000000,
        -9.54791801177635e-15, 1.90211303259031,      -1.39680224666743,
        1.39680224666741,      -1.61803398874990,     6.32827124036339e-15,
        -0.642039521920206,    -0.642039521920206,    0.00000000000000,
        5.88201851972683e-15,  -0.642039521920219,    0.642039521920207,
        -1.61803398874990,     -2.22044604925031e-14, -1.39680224666742,
        -1.39680224666742,     9.10382880192628e-15,  -1.90211303259031,
        1.00000000000000,      -0.999999999999985,    0.618033988749879,
        8.43769498715119e-15,  -0.221231742082474,    -0.221231742082475,
        5.55111512312578e-15,  -1.17557050458495,     1.26007351067012,
        -1.26007351067009,     2.00000000000000,      2.69546091939735e-14,
        1.26007351067013,      1.26007351067009,      1.55431223447522e-14,
        1.17557050458496,      -0.221231742082480,    0.221231742082484,
        0.618033988749890,     -2.77555756156289e-15, 1.00000000000000,
        1.00000000000000,      2.54241072639161e-14,  1.90211303259030,
        -1.39680224666741,     1.39680224666743,      -1.61803398874990,
        7.32747196252603e-15,  -0.642039521920206,    -0.642039521920206,
        0.00000000000000,      5.14723044023841e-15,  -0.642039521920193,
        0.642039521920205,     -1.61803398874989,     7.54951656745106e-15,
        -1.39680224666742,     -1.39680224666742,     7.93809462606987e-15,
        -1.90211303259031,     1.00000000000000,      -0.999999999999986,
        0.618033988749900,     -2.99760216648792e-15, -0.221231742082474,
        -0.221231742082474,    4.77395900588817e-15,  -1.17557050458495,
        1.26007351067011,      -1.26007351067009,     2.00000000000000,
        -9.79717439317883e-15, 1.26007351067010,      1.26007351067010,
        -4.55191440096314e-15, 1.17557050458494,      -0.221231742082469,
        0.221231742082465,     0.618033988749909,     7.88258347483861e-15,
        1.00000000000000,      0.999999999999999,     -7.27196081129478e-15,
        1.90211303259031,      -1.39680224666743,     1.39680224666741,
        -1.61803398874989,     -2.04281036531029e-14, -0.642039521920182,
        -0.642039521920204,    0.00000000000000,      4.41244236075000e-15,
        -0.642039521920217,    0.642039521920207,     -1.61803398874989,
        8.43769498715119e-15,  -1.39680224666742,     -1.39680224666742,
        -2.70339306496226e-14, -1.90211303259031,     0.999999999999996,
        -1.00000000000002,     0.618033988749901,     -3.33066907387547e-15,
        -0.221231742082474,    -0.221231742082473,    -1.68753899743024e-14,
        -1.17557050458493,     1.26007351067008,      -1.26007351067011,
        2.00000000000000,      -1.10218211923262e-14, 1.26007351067010,
        1.26007351067010,      -3.88578058618805e-15, 1.17557050458494,
        -0.221231742082481,    0.221231742082485,     0.618033988749889,
        -3.44169137633799e-15, 1.00000000000000,      0.999999999999998,
        -6.05071548420710e-15, 1.90211303259031,      -1.39680224666743,
        1.39680224666741,      -1.61803398874990,     9.32587340685132e-15,
        -0.642039521920208,    -0.642039521920206,    0.00000000000000,
        3.67765428126159e-15,  -0.642039521920217,    0.642039521920207,
        -1.61803398874990,     -1.93178806284777e-14, -1.39680224666742,
        -1.39680224666742,     5.60662627435704e-15,  -1.90211303259031,
        1.00000000000000,      -0.999999999999988,    0.618033988749881,
        7.32747196252603e-15,  -0.221231742082484,    -0.221231742082492,
        3.33066907387547e-15,  -1.17557050458495,     1.26007351067011,
        -1.26007351067009,     2.00000000000000,      2.32806687965315e-14,
        1.26007351067007,      1.26007351067012,      -3.21964677141295e-15,
        1.17557050458494,      -0.221231742082470,    0.221231742082467,
        0.618033988749867,     -1.47659662275146e-14, 1.00000000000001,
        0.999999999999969,     2.89213097914853e-14,  1.90211303259030,
        -1.39680224666741,     1.39680224666744,      -1.61803398874990,
        1.02140518265514e-14,  -0.642039521920209,    -0.642039521920206,
        0.00000000000000,      2.94286620177318e-15,  -0.642039521920216,
        0.642039521920207,     -1.61803398874990,     -1.83186799063151e-14,
        -1.39680224666745,     -1.39680224666739,     -2.93653990013354e-14,
        -1.90211303259031,     0.999999999999996,     -1.00000000000002,
        0.618033988749903,     -4.10782519111308e-15, -0.221231742082473,
        -0.221231742082472,    2.55351295663786e-15,  -1.17557050458495,
        1.26007351067011,      -1.26007351067010,     2.00000000000000,
        2.20560219973841e-14,  1.26007351067008,      1.26007351067011,
        -2.33146835171283e-14, 1.17557050458493,      -0.221231742082481,
        0.221231742082486,     0.618033988749887,     -4.21884749357560e-15,
        1.00000000000000,      0.999999999999996,     -3.71924713249427e-15,
        1.90211303259031,      -1.39680224666743,     1.39680224666741,
        -1.61803398874989,     -1.75415237890775e-14, -0.642039521920185,
        -0.642039521920204,    0.00000000000000,      2.35243601950878e-14,
        -0.642039521920240,    0.642039521920209,     -1.61803398874989,
        1.15463194561016e-14,  -1.39680224666742,     -1.39680224666742,
        3.27515792264421e-15,  -1.90211303259031,     1.00000000000000,
        -0.999999999999990,    0.618033988749923,     -1.54321000422897e-14,
        -0.221231742082462,    -0.221231742082452,    -1.89848137210902e-14,
        -1.17557050458493,     1.26007351067008,      -1.26007351067011,
        2.00000000000000,      -1.46957615897682e-14, 1.26007351067011,
        1.26007351067010,      -1.66533453693773e-15, 1.17557050458495,
        -0.221231742082471,    0.221231742082468,     0.618033988749907,
        6.32827124036339e-15,  0.999999999999994,     1.00000000000002,
        3.11972669919669e-14,  1.90211303259030,      -1.39680224666741,
        1.39680224666744,      -1.61803398874990,     1.23234755733392e-14,
        -0.642039521920211,    -0.642039521920207,    0.00000000000000,
        1.47329004279635e-15,  -0.642039521920214,    0.642039521920207,
        -1.61803398874990,     -1.62092561595273e-14, -1.39680224666740,
        -1.39680224666744,     3.59157148466238e-14,  -1.90211303259030,
        0.999999999999995,     -1.00000000000002,     0.618033988749904,
        -4.88498130835069e-15, -0.221231742082472,    -0.221231742082471,
        1.11022302462516e-15,  -1.17557050458495,     1.26007351067011,
        -1.26007351067010,     2.00000000000000,      1.96067283990894e-14,
        1.26007351067008,      1.26007351067011,      -2.18713935851156e-14,
        1.17557050458493,      -0.221231742082460,    0.221231742082450,
        0.618033988749926,     1.69864122767649e-14,  1.00000000000000,
        0.999999999999994,     -1.44328993201270e-15, 1.90211303259031,
        -1.39680224666743,     1.39680224666741,      -1.61803398874989,
        -1.54321000422897e-14, -0.642039521920187,    -0.642039521920205,
        0.00000000000000,      2.20547840361110e-14,  -0.642039521920238,
        0.642039521920209,     -1.61803398874991,     -4.39648317751562e-14,
        -1.39680224666738,     -1.39680224666747,     9.43689570931383e-16,
        -1.90211303259031,     1.00000000000000,      -0.999999999999992,
        0.618033988749884,     5.77315972805081e-15,  -0.221231742082483,
        -0.221231742082489,    2.13162820728030e-14,  -1.17557050458496,
        1.26007351067014,      -1.26007351067008,     2.00000000000000,
        5.39092183879471e-14,  1.26007351067005,      1.26007351067013,
        4.14113188185183e-14,  1.17557050458498,      -0.221231742082493,
        0.221231742082507,     0.618033988749865,     -1.63202784619898e-14,
        1.00000000000001,      0.999999999999965,     3.35287353436797e-14,
        1.90211303259030,      -1.39680224666740,     1.39680224666744,
        -1.61803398874990,     1.43218770176645e-14,  -0.642039521920212,
        -0.642039521920207,    0.00000000000000,      3.71388381953015e-18,
        -0.642039521920163,    0.642039521920203,     -1.61803398874988,
        4.31876756579186e-14,  -1.39680224666745,     -1.39680224666739,
        -3.40283357047611e-14, -1.90211303259031,     0.999999999999995,
        -1.00000000000002,     0.618033988749905,     -5.55111512312578e-15,
        -0.221231742082471,    -0.221231742082469,    -3.33066907387547e-16,
        -1.17557050458495,     1.26007351067011,      -1.26007351067010,
        2.00000000000000,      1.71574348007947e-14,  1.26007351067014,
        1.26007351067008,      2.13162820728030e-14,  1.17557050458496,
        -0.221231742082483,    0.221231742082489,     0.618033988749884,
        -5.77315972805081e-15, 1.00000000000000,      0.999999999999992,
        9.43689570931383e-16,  1.90211303259031,      -1.39680224666743,
        1.39680224666741,      -1.61803398874989,     -1.34336985979644e-14,
        -0.642039521920188,    -0.642039521920205,    0.00000000000000,
        2.05852078771341e-14,  -0.642039521920187,    0.642039521920205,
        -1.61803398874989,     1.54321000422897e-14,  -1.39680224666743,
        -1.39680224666741,     -1.44328993201270e-15, -1.90211303259031,
        1.00000000000000,      -0.999999999999994,    0.618033988749886,
        4.99600361081320e-15,  -0.221231742082482,    -0.221231742082488,
        1.99840144432528e-14,  -1.17557050458496,     1.26007351067014,
        -1.26007351067008,     2.00000000000000,      -1.95943487863577e-14,
        1.26007351067011,      1.26007351067010,      1.11022302462516e-15,
        1.17557050458495,      -0.221231742082472,    0.221231742082471,
        0.618033988749904,     4.88498130835069e-15,  0.999999999999995,
        1.00000000000002,      -3.16968673530482e-14, 1.90211303259031,
        -1.39680224666745,     1.39680224666739,      -1.61803398874988,
        -4.11892742135933e-14, -0.642039521920164,    -0.642039521920203,
        0.00000000000000,      -1.46586227515729e-15, -0.642039521920211,
        0.642039521920207,     -1.61803398874990,     -1.23234755733392e-14,
        -1.39680224666741,     -1.39680224666744,     3.12527781431982e-14,
        -1.90211303259030,     1.00000000000001,      -0.999999999999967,
        0.618033988749866,     1.56541446472147e-14,  -0.221231742082493,
        -0.221231742082506,    4.00790511889682e-14,  -1.17557050458498,
        1.26007351067011,      -1.26007351067010,     2.00000000000000,
        1.47081412025000e-14,  1.26007351067008,      1.26007351067011,
        -1.89848137210902e-14, 1.17557050458493,      -0.221231742082462,
        0.221231742082452,     0.618033988749883,     -6.43929354282591e-15,
        1.00000000000000,      0.999999999999990,     3.21964677141295e-15,
        1.90211303259031,      -1.39680224666738,     1.39680224666747,
        -1.61803398874991,     4.59632332194815e-14,  -0.642039521920240,
        -0.642039521920209,    0.00000000000000,      -2.35169324274487e-14,
        -0.642039521920185,    0.642039521920204,     -1.61803398874989,
        1.75415237890775e-14,  -1.39680224666743,     -1.39680224666741,
        -3.71924713249427e-15, -1.90211303259031,     1.00000000000000,
        -0.999999999999996,    0.618033988749928,     -1.76525460915400e-14,
        -0.221231742082459,    -0.221231742082449,    -2.33146835171283e-14,
        -1.17557050458493,     1.26007351067008,      -1.26007351067011,
        2.00000000000000,      -2.20436423846524e-14, 1.26007351067011,
        1.26007351067010,      2.55351295663786e-15,  1.17557050458495,
        -0.221231742082473,    0.221231742082472,     0.618033988749903,
        4.10782519111308e-15,  0.999999999999996,     1.00000000000002,
        3.81916720471054e-14,  1.90211303259030,      -1.39680224666740,
        1.39680224666744,      -1.61803398874990,     1.82076576038526e-14,
        -0.642039521920216,    -0.642039521920207,    0.00000000000000,
        -2.93543843413412e-15, -0.642039521920209,    0.642039521920206,
        -1.61803398874990,     -1.02140518265514e-14, -1.39680224666741,
        -1.39680224666744,     2.89213097914853e-14,  -1.90211303259030,
        0.999999999999994,     -1.00000000000003,     0.618033988749908,
        -7.10542735760100e-15, -0.221231742082470,    -0.221231742082467,
        -3.21964677141295e-15, -1.17557050458494,     1.26007351067010,
        -1.26007351067010,     2.00000000000000,      1.22588476042053e-14,
        1.26007351067008,      1.26007351067011,      -1.75415237890775e-14,
        1.17557050458493,      -0.221231742082462,    0.221231742082454,
        0.618033988749922,     1.46549439250521e-14,  1.00000000000000,
        0.999999999999988,     5.60662627435704e-15,  1.90211303259031,
        -1.39680224666742,     1.39680224666742,      -1.61803398874989,
        -9.43689570931383e-15, -0.642039521920192,    -0.642039521920205,
        0.00000000000000,      1.76460555591805e-14,  -0.642039521920233,
        0.642039521920208,     -1.61803398874991,     -3.79696274421804e-14,
        -1.39680224666739,     -1.39680224666746,     6.15063555642337e-14,
        -1.90211303259030,     1.00000000000000,      -0.999999999999998,
        0.618033988749889,     3.44169137633799e-15,  -0.221231742082481,
        -0.221231742082485,    1.69864122767649e-14,  -1.17557050458496,
        1.26007351067013,      -1.26007351067008,     2.00000000000000,
        4.65613375930630e-14,  1.26007351067006,      1.26007351067013,
        -3.77475828372553e-14, 1.17557050458492,      -0.221231742082452,
        0.221231742082436,     0.618033988749901,     3.33066907387547e-15,
        0.999999999999996,     1.00000000000002,      -2.70339306496226e-14,
        1.90211303259031,      -1.39680224666740,     1.39680224666745,
        -1.61803398874993,     7.77156117237610e-14,  -0.642039521920217,
        -0.642039521920207,    0.00000000000000,      -4.70375787387170e-14,
        -0.642039521920207,    0.642039521920206,     -1.61803398874987,
        4.91828799908944e-14,  -1.39680224666741,     -1.39680224666744,
        -4.09672296086683e-14, -1.90211303259032,     1.00000000000001,
        -0.999999999999971,    0.618033988749909,     -7.88258347483861e-15,
        -0.221231742082447,    -0.221231742082428,    -4.55191440096314e-15,
        -1.17557050458494,     1.26007351067004,      -1.26007351067013,
        2.00000000000000,      9.80955400591059e-15,  1.26007351067014,
        1.26007351067008,      -1.60982338570648e-14, 1.17557050458493,
        -0.221231742082485,    0.221231742082493,     0.618033988749921,
        1.38777878078145e-14,  1.00000000000000,      0.999999999999986,
        7.54396545232794e-14,  1.90211303259029,      -1.39680224666742,
        1.39680224666742,      -1.61803398874992,     4.99600361081320e-14,
        -0.642039521920193,    -0.642039521920205,    0.00000000000000,
        -2.64560847454024e-14, -0.642039521920231,    0.642039521920208,
        -1.61803398874989,     2.14273043752655e-14,  -1.39680224666739,
        -1.39680224666746,     -8.38218383591993e-15, -1.90211303259031,
        1.00000000000001,      -0.999999999999943,    0.618033988749890,
        2.77555756156289e-15,  -0.221231742082458,    -0.221231742082446,
        1.55431223447522e-14,  -1.17557050458496,     1.26007351067007,
        -1.26007351067012,     2.00000000000000,      4.41120439947683e-14,
        1.26007351067012,      1.26007351067009,      -3.63042929052426e-14,
        1.17557050458492,      -0.221231742082474,    0.221231742082475,
        0.618033988749940,     2.45359288442160e-14,  0.999999999999997,
        1.00000000000001,      4.28546087505310e-14,  1.90211303259030,
        -1.39680224666744,     1.39680224666739,      -1.61803398874990,
        2.22044604925031e-14,  -0.642039521920170,    -0.642039521920203,
        0.00000000000000,      -5.87459075208776e-15, -0.642039521920255,
        0.642039521920210,     -1.61803398874990,     -6.32827124036339e-15,
        -1.39680224666737,     -1.39680224666749,     2.42583730880597e-14,
        -1.90211303259030,     0.999999999999993,     -1.00000000000003,
        0.618033988749870,     1.33226762955019e-14,  -0.221231742082468,
        -0.221231742082464,    3.57491813929300e-14,  -1.17557050458498,
        1.26007351067010,      -1.26007351067010,     2.00000000000000,
        7.84145339836259e-14,  1.26007351067009,      1.26007351067011,
        -5.65103519534205e-14, 1.17557050458490,      -0.221231742082464,
        0.221231742082456,     0.618033988749879,     -8.77076189453874e-15,
        0.999999999999990,     1.00000000000004,      1.02140518265514e-14,
        1.90211303259031,      -1.39680224666746,     1.39680224666737,
        -1.61803398874989,     -5.55111512312578e-15, -0.642039521920245,
        -0.642039521920209,    0.00000000000000,      1.47069032412268e-14,
        -0.642039521920180,    0.642039521920204,     -1.61803398874986,
        8.09352584951739e-14,  -1.39680224666743,     -1.39680224666741,
        -7.83262343873048e-14, -1.90211303259032,     1.00000000000000,
        -1.00000000000000,     0.618033988749932,     -1.99840144432528e-14,
        -0.221231742082479,    -0.221231742082482,    -2.76445533131664e-14,
        -1.17557050458492,     1.26007351067013,      -1.26007351067009,
        2.00000000000000,      -2.93915231795365e-14, 1.26007351067018,
        1.26007351067006,      6.88338275267597e-15,  1.17557050458495,
        -0.221231742082497,    0.221231742082513,     0.618033988749898,
        1.88737914186277e-15,  1.00000000000001,      0.999999999999955,
        -2.23709939461969e-14, 1.90211303259031,      -1.39680224666740,
        1.39680224666745,      -1.61803398874988,     -3.33066907387547e-14,
        -0.642039521920221,    -0.642039521920207,    0.00000000000000,
        3.52883972345414e-14,  -0.642039521920204,    0.642039521920206,
        -1.61803398874987,     5.31796828795450e-14,  -1.39680224666741,
        -1.39680224666743,     -4.56856774633252e-14, -1.90211303259032,
        1.00000000000001,      -0.999999999999975,    0.618033988749912,
        -9.32587340685132e-15, -0.221231742082490,    -0.221231742082501,
        -7.54951656745106e-15, -1.17557050458494,     1.26007351067016,
        -1.26007351067007,     2.00000000000000,      4.91096680932118e-15,
        1.26007351067015,      1.26007351067008,      -1.32116539930394e-14,
        1.17557050458494,      -0.221231742082487,    0.221231742082495,
        0.618033988749918,     1.24344978758018e-14,  1.00000000000000,
        0.999999999999982,     -5.50115508701765e-14, 1.90211303259032,
        -1.39680224666742,     1.39680224666742,      -1.61803398874987,
        -6.10622663543836e-14, -0.642039521920197,    -0.642039521920205,
        0.00000000000000,      -2.93952370633560e-14, -0.642039521920228,
        0.642039521920208};
    float32_t cfft_testinput_f32_50hz_200Hz_ref[1024] = {
        2.00000000000000,      0.00000000000000,      1.26007351067010,
        1.26007351067010,      1.11022302462516e-16,  1.17557050458495,
        -0.221231742082474,    0.221231742082474,     0.618033988749895,
        -1.11022302462516e-16, 1.00000000000000,      1.00000000000000,
        -7.21644966006352e-16, 1.90211303259031,      -1.39680224666742,
        1.39680224666742,      -1.61803398874990,     4.44089209850063e-16,
        -0.642039521920207,    -0.642039521920206,    0.00000000000000,
        -3.67394039744206e-16, -0.642039521920206,    0.642039521920206,
        -1.61803398874990,     -1.22124532708767e-15, -1.39680224666742,
        -1.39680224666742,     -7.77156117237610e-16, -1.90211303259031,
        1.00000000000000,      -1.00000000000000,     0.618033988749895,
        -3.33066907387547e-16, -0.221231742082475,    -0.221231742082476,
        -5.55111512312578e-16, -1.17557050458495,     1.26007351067010,
        -1.26007351067010,     2.00000000000000,      -1.22464679914735e-15,
        1.26007351067010,      1.26007351067010,      7.77156117237610e-16,
        1.17557050458495,      -0.221231742082475,    0.221231742082475,
        0.618033988749897,     8.88178419700125e-16,  0.999999999999999,
        1.00000000000000,      1.49880108324396e-15,  1.90211303259031,
        -1.39680224666742,     1.39680224666742,      -1.61803398874990,
        1.33226762955019e-15,  -0.642039521920207,    -0.642039521920206,
        0.00000000000000,      -1.10218211923262e-15, -0.642039521920205,
        0.642039521920206,     -1.61803398874989,     1.55431223447522e-15,
        -1.39680224666742,     -1.39680224666743,     6.49480469405717e-15,
        -1.90211303259031,     1.00000000000000,      -0.999999999999995,
        0.618033988749896,     -7.77156117237610e-16, -0.221231742082474,
        -0.221231742082473,    -1.44328993201270e-15, -1.17557050458495,
        1.26007351067010,      -1.26007351067010,     2.00000000000000,
        -2.44929359829471e-15, 1.26007351067010,      1.26007351067010,
        -3.77475828372553e-15, 1.17557050458494,      -0.221231742082475,
        0.221231742082476,     0.618033988749893,     -7.77156117237610e-16,
        1.00000000000000,      0.999999999999998,     2.66453525910038e-15,
        1.90211303259031,      -1.39680224666742,     1.39680224666742,
        -1.61803398874989,     -4.88498130835069e-15, -0.642039521920202,
        -0.642039521920206,    0.00000000000000,      3.49210031947972e-15,
        -0.642039521920198,    0.642039521920206,     -1.61803398874989,
        2.55351295663786e-15,  -1.39680224666742,     -1.39680224666742,
        -3.16413562018170e-15, -1.90211303259031,     1.00000000000000,
        -0.999999999999996,    0.618033988749897,     -9.99200722162641e-16,
        -0.221231742082476,    -0.221231742082477,    -2.10942374678780e-15,
        -1.17557050458494,     1.26007351067009,      -1.26007351067011,
        2.00000000000000,      -3.67394039744206e-15, 1.26007351067010,
        1.26007351067010,      2.22044604925031e-15,  1.17557050458495,
        -0.221231742082473,    0.221231742082472,     0.618033988749893,
        -1.22124532708767e-15, 0.999999999999999,     1.00000000000000,
        -1.31006316905768e-14, 1.90211303259031,      -1.39680224666742,
        1.39680224666742,      -1.61803398874989,     -1.09912079437891e-14,
        -0.642039521920203,    -0.642039521920206,    0.00000000000000,
        8.08638275819206e-15,  -0.642039521920197,    0.642039521920205,
        -1.61803398874989,     3.55271367880050e-15,  -1.39680224666743,
        -1.39680224666741,     -4.32986979603811e-15, -1.90211303259031,
        1.00000000000000,      -0.999999999999997,    0.618033988749898,
        -1.44328993201270e-15, -0.221231742082476,    -0.221231742082476,
        -2.77555756156289e-15, -1.17557050458494,     1.26007351067010,
        -1.26007351067010,     2.00000000000000,      -4.89858719658941e-15,
        1.26007351067010,      1.26007351067010,      -7.54951656745106e-15,
        1.17557050458494,      -0.221231742082473,    0.221231742082472,
        0.618033988749902,     3.88578058618805e-15,  0.999999999999999,
        1.00000000000000,      5.05151476204446e-15,  1.90211303259031,
        -1.39680224666741,     1.39680224666743,      -1.61803398874990,
        4.44089209850063e-15,  -0.642039521920216,    -0.642039521920207,
        0.00000000000000,      -3.30654635769785e-15, -0.642039521920209,
        0.642039521920206,     -1.61803398874989,     4.55191440096314e-15,
        -1.39680224666742,     -1.39680224666742,     -5.44009282066327e-15,
        -1.90211303259031,     1.00000000000000,      -0.999999999999998,
        0.618033988749888,     3.66373598126302e-15,  -0.221231742082475,
        -0.221231742082476,    6.88338275267597e-15,  -1.17557050458495,
        1.26007351067010,      -1.26007351067010,     2.00000000000000,
        1.16403343982657e-14,  1.26007351067010,      1.26007351067010,
        1.40998324127395e-14,  1.17557050458496,      -0.221231742082479,
        0.221231742082482,     0.618033988749891,     -1.99840144432528e-15,
        1.00000000000000,      1.00000000000000,      -1.07136521876328e-14,
        1.90211303259031,      -1.39680224666741,     1.39680224666743,
        -1.61803398874990,     5.44009282066327e-15,  -0.642039521920205,
        -0.642039521920206,    0.00000000000000,      6.61680659921524e-15,
        -0.642039521920220,    0.642039521920207,     -1.61803398874989,
        5.55111512312578e-15,  -1.39680224666742,     -1.39680224666742,
        1.02140518265514e-14,  -1.90211303259031,     1.00000000000000,
        -0.999999999999984,    0.618033988749899,     -2.10942374678780e-15,
        -0.221231742082475,    -0.221231742082475,    -1.47659662275146e-14,
        -1.17557050458493,     1.26007351067009,      -1.26007351067011,
        2.00000000000000,      -7.34788079488412e-15, 1.26007351067010,
        1.26007351067010,      -5.99520433297585e-15, 1.17557050458494,
        -0.221231742082479,    0.221231742082483,     0.618033988749891,
        -2.33146835171283e-15, 1.00000000000000,      1.00000000000000,
        -9.54791801177635e-15, 1.90211303259031,      -1.39680224666743,
        1.39680224666741,      -1.61803398874990,     6.32827124036339e-15,
        -0.642039521920206,    -0.642039521920206,    0.00000000000000,
        5.88201851972683e-15,  -0.642039521920219,    0.642039521920207,
        -1.61803398874990,     -2.22044604925031e-14, -1.39680224666742,
        -1.39680224666742,     9.10382880192628e-15,  -1.90211303259031,
        1.00000000000000,      -0.999999999999985,    0.618033988749879,
        8.43769498715119e-15,  -0.221231742082474,    -0.221231742082475,
        5.55111512312578e-15,  -1.17557050458495,     1.26007351067012,
        -1.26007351067009,     2.00000000000000,      2.69546091939735e-14,
        1.26007351067013,      1.26007351067009,      1.55431223447522e-14,
        1.17557050458496,      -0.221231742082480,    0.221231742082484,
        0.618033988749890,     -2.77555756156289e-15, 1.00000000000000,
        1.00000000000000,      2.54241072639161e-14,  1.90211303259030,
        -1.39680224666741,     1.39680224666743,      -1.61803398874990,
        7.32747196252603e-15,  -0.642039521920206,    -0.642039521920206,
        0.00000000000000,      5.14723044023841e-15,  -0.642039521920193,
        0.642039521920205,     -1.61803398874989,     7.54951656745106e-15,
        -1.39680224666742,     -1.39680224666742,     7.93809462606987e-15,
        -1.90211303259031,     1.00000000000000,      -0.999999999999986,
        0.618033988749900,     -2.99760216648792e-15, -0.221231742082474,
        -0.221231742082474,    4.77395900588817e-15,  -1.17557050458495,
        1.26007351067011,      -1.26007351067009,     2.00000000000000,
        -9.79717439317883e-15, 1.26007351067010,      1.26007351067010,
        -4.55191440096314e-15, 1.17557050458494,      -0.221231742082469,
        0.221231742082465,     0.618033988749909,     7.88258347483861e-15,
        1.00000000000000,      0.999999999999999,     -7.27196081129478e-15,
        1.90211303259031,      -1.39680224666743,     1.39680224666741,
        -1.61803398874989,     -2.04281036531029e-14, -0.642039521920182,
        -0.642039521920204,    0.00000000000000,      4.41244236075000e-15,
        -0.642039521920217,    0.642039521920207,     -1.61803398874989,
        8.43769498715119e-15,  -1.39680224666742,     -1.39680224666742,
        -2.70339306496226e-14, -1.90211303259031,     0.999999999999996,
        -1.00000000000002,     0.618033988749901,     -3.33066907387547e-15,
        -0.221231742082474,    -0.221231742082473,    -1.68753899743024e-14,
        -1.17557050458493,     1.26007351067008,      -1.26007351067011,
        2.00000000000000,      -1.10218211923262e-14, 1.26007351067010,
        1.26007351067010,      -3.88578058618805e-15, 1.17557050458494,
        -0.221231742082481,    0.221231742082485,     0.618033988749889,
        -3.44169137633799e-15, 1.00000000000000,      0.999999999999998,
        -6.05071548420710e-15, 1.90211303259031,      -1.39680224666743,
        1.39680224666741,      -1.61803398874990,     9.32587340685132e-15,
        -0.642039521920208,    -0.642039521920206,    0.00000000000000,
        3.67765428126159e-15,  -0.642039521920217,    0.642039521920207,
        -1.61803398874990,     -1.93178806284777e-14, -1.39680224666742,
        -1.39680224666742,     5.60662627435704e-15,  -1.90211303259031,
        1.00000000000000,      -0.999999999999988,    0.618033988749881,
        7.32747196252603e-15,  -0.221231742082484,    -0.221231742082492,
        3.33066907387547e-15,  -1.17557050458495,     1.26007351067011,
        -1.26007351067009,     2.00000000000000,      2.32806687965315e-14,
        1.26007351067007,      1.26007351067012,      -3.21964677141295e-15,
        1.17557050458494,      -0.221231742082470,    0.221231742082467,
        0.618033988749867,     -1.47659662275146e-14, 1.00000000000001,
        0.999999999999969,     2.89213097914853e-14,  1.90211303259030,
        -1.39680224666741,     1.39680224666744,      -1.61803398874990,
        1.02140518265514e-14,  -0.642039521920209,    -0.642039521920206,
        0.00000000000000,      2.94286620177318e-15,  -0.642039521920216,
        0.642039521920207,     -1.61803398874990,     -1.83186799063151e-14,
        -1.39680224666745,     -1.39680224666739,     -2.93653990013354e-14,
        -1.90211303259031,     0.999999999999996,     -1.00000000000002,
        0.618033988749903,     -4.10782519111308e-15, -0.221231742082473,
        -0.221231742082472,    2.55351295663786e-15,  -1.17557050458495,
        1.26007351067011,      -1.26007351067010,     2.00000000000000,
        2.20560219973841e-14,  1.26007351067008,      1.26007351067011,
        -2.33146835171283e-14, 1.17557050458493,      -0.221231742082481,
        0.221231742082486,     0.618033988749887,     -4.21884749357560e-15,
        1.00000000000000,      0.999999999999996,     -3.71924713249427e-15,
        1.90211303259031,      -1.39680224666743,     1.39680224666741,
        -1.61803398874989,     -1.75415237890775e-14, -0.642039521920185,
        -0.642039521920204,    0.00000000000000,      2.35243601950878e-14,
        -0.642039521920240,    0.642039521920209,     -1.61803398874989,
        1.15463194561016e-14,  -1.39680224666742,     -1.39680224666742,
        3.27515792264421e-15,  -1.90211303259031,     1.00000000000000,
        -0.999999999999990,    0.618033988749923,     -1.54321000422897e-14,
        -0.221231742082462,    -0.221231742082452,    -1.89848137210902e-14,
        -1.17557050458493,     1.26007351067008,      -1.26007351067011,
        2.00000000000000,      -1.46957615897682e-14, 1.26007351067011,
        1.26007351067010,      -1.66533453693773e-15, 1.17557050458495,
        -0.221231742082471,    0.221231742082468,     0.618033988749907,
        6.32827124036339e-15,  0.999999999999994,     1.00000000000002,
        3.11972669919669e-14,  1.90211303259030,      -1.39680224666741,
        1.39680224666744,      -1.61803398874990,     1.23234755733392e-14,
        -0.642039521920211,    -0.642039521920207,    0.00000000000000,
        1.47329004279635e-15,  -0.642039521920214,    0.642039521920207,
        -1.61803398874990,     -1.62092561595273e-14, -1.39680224666740,
        -1.39680224666744,     3.59157148466238e-14,  -1.90211303259030,
        0.999999999999995,     -1.00000000000002,     0.618033988749904,
        -4.88498130835069e-15, -0.221231742082472,    -0.221231742082471,
        1.11022302462516e-15,  -1.17557050458495,     1.26007351067011,
        -1.26007351067010,     2.00000000000000,      1.96067283990894e-14,
        1.26007351067008,      1.26007351067011,      -2.18713935851156e-14,
        1.17557050458493,      -0.221231742082460,    0.221231742082450,
        0.618033988749926,     1.69864122767649e-14,  1.00000000000000,
        0.999999999999994,     -1.44328993201270e-15, 1.90211303259031,
        -1.39680224666743,     1.39680224666741,      -1.61803398874989,
        -1.54321000422897e-14, -0.642039521920187,    -0.642039521920205,
        0.00000000000000,      2.20547840361110e-14,  -0.642039521920238,
        0.642039521920209,     -1.61803398874991,     -4.39648317751562e-14,
        -1.39680224666738,     -1.39680224666747,     9.43689570931383e-16,
        -1.90211303259031,     1.00000000000000,      -0.999999999999992,
        0.618033988749884,     5.77315972805081e-15,  -0.221231742082483,
        -0.221231742082489,    2.13162820728030e-14,  -1.17557050458496,
        1.26007351067014,      -1.26007351067008,     2.00000000000000,
        5.39092183879471e-14,  1.26007351067005,      1.26007351067013,
        4.14113188185183e-14,  1.17557050458498,      -0.221231742082493,
        0.221231742082507,     0.618033988749865,     -1.63202784619898e-14,
        1.00000000000001,      0.999999999999965,     3.35287353436797e-14,
        1.90211303259030,      -1.39680224666740,     1.39680224666744,
        -1.61803398874990,     1.43218770176645e-14,  -0.642039521920212,
        -0.642039521920207,    0.00000000000000,      3.71388381953015e-18,
        -0.642039521920163,    0.642039521920203,     -1.61803398874988,
        4.31876756579186e-14,  -1.39680224666745,     -1.39680224666739,
        -3.40283357047611e-14, -1.90211303259031,     0.999999999999995,
        -1.00000000000002,     0.618033988749905,     -5.55111512312578e-15,
        -0.221231742082471,    -0.221231742082469,    -3.33066907387547e-16,
        -1.17557050458495,     1.26007351067011,      -1.26007351067010,
        2.00000000000000,      1.71574348007947e-14,  1.26007351067014,
        1.26007351067008,      2.13162820728030e-14,  1.17557050458496,
        -0.221231742082483,    0.221231742082489,     0.618033988749884,
        -5.77315972805081e-15, 1.00000000000000,      0.999999999999992,
        9.43689570931383e-16,  1.90211303259031,      -1.39680224666743,
        1.39680224666741,      -1.61803398874989,     -1.34336985979644e-14,
        -0.642039521920188,    -0.642039521920205,    0.00000000000000,
        2.05852078771341e-14,  -0.642039521920187,    0.642039521920205,
        -1.61803398874989,     1.54321000422897e-14,  -1.39680224666743,
        -1.39680224666741,     -1.44328993201270e-15, -1.90211303259031,
        1.00000000000000,      -0.999999999999994,    0.618033988749886,
        4.99600361081320e-15,  -0.221231742082482,    -0.221231742082488,
        1.99840144432528e-14,  -1.17557050458496,     1.26007351067014,
        -1.26007351067008,     2.00000000000000,      -1.95943487863577e-14,
        1.26007351067011,      1.26007351067010,      1.11022302462516e-15,
        1.17557050458495,      -0.221231742082472,    0.221231742082471,
        0.618033988749904,     4.88498130835069e-15,  0.999999999999995,
        1.00000000000002,      -3.16968673530482e-14, 1.90211303259031,
        -1.39680224666745,     1.39680224666739,      -1.61803398874988,
        -4.11892742135933e-14, -0.642039521920164,    -0.642039521920203,
        0.00000000000000,      -1.46586227515729e-15, -0.642039521920211,
        0.642039521920207,     -1.61803398874990,     -1.23234755733392e-14,
        -1.39680224666741,     -1.39680224666744,     3.12527781431982e-14,
        -1.90211303259030,     1.00000000000001,      -0.999999999999967,
        0.618033988749866,     1.56541446472147e-14,  -0.221231742082493,
        -0.221231742082506,    4.00790511889682e-14,  -1.17557050458498,
        1.26007351067011,      -1.26007351067010,     2.00000000000000,
        1.47081412025000e-14,  1.26007351067008,      1.26007351067011,
        -1.89848137210902e-14, 1.17557050458493,      -0.221231742082462,
        0.221231742082452,     0.618033988749883,     -6.43929354282591e-15,
        1.00000000000000,      0.999999999999990,     3.21964677141295e-15,
        1.90211303259031,      -1.39680224666738,     1.39680224666747,
        -1.61803398874991,     4.59632332194815e-14,  -0.642039521920240,
        -0.642039521920209,    0.00000000000000,      -2.35169324274487e-14,
        -0.642039521920185,    0.642039521920204,     -1.61803398874989,
        1.75415237890775e-14,  -1.39680224666743,     -1.39680224666741,
        -3.71924713249427e-15, -1.90211303259031,     1.00000000000000,
        -0.999999999999996,    0.618033988749928,     -1.76525460915400e-14,
        -0.221231742082459,    -0.221231742082449,    -2.33146835171283e-14,
        -1.17557050458493,     1.26007351067008,      -1.26007351067011,
        2.00000000000000,      -2.20436423846524e-14, 1.26007351067011,
        1.26007351067010,      2.55351295663786e-15,  1.17557050458495,
        -0.221231742082473,    0.221231742082472,     0.618033988749903,
        4.10782519111308e-15,  0.999999999999996,     1.00000000000002,
        3.81916720471054e-14,  1.90211303259030,      -1.39680224666740,
        1.39680224666744,      -1.61803398874990,     1.82076576038526e-14,
        -0.642039521920216,    -0.642039521920207,    0.00000000000000,
        -2.93543843413412e-15, -0.642039521920209,    0.642039521920206,
        -1.61803398874990,     -1.02140518265514e-14, -1.39680224666741,
        -1.39680224666744,     2.89213097914853e-14,  -1.90211303259030,
        0.999999999999994,     -1.00000000000003,     0.618033988749908,
        -7.10542735760100e-15, -0.221231742082470,    -0.221231742082467,
        -3.21964677141295e-15, -1.17557050458494,     1.26007351067010,
        -1.26007351067010,     2.00000000000000,      1.22588476042053e-14,
        1.26007351067008,      1.26007351067011,      -1.75415237890775e-14,
        1.17557050458493,      -0.221231742082462,    0.221231742082454,
        0.618033988749922,     1.46549439250521e-14,  1.00000000000000,
        0.999999999999988,     5.60662627435704e-15,  1.90211303259031,
        -1.39680224666742,     1.39680224666742,      -1.61803398874989,
        -9.43689570931383e-15, -0.642039521920192,    -0.642039521920205,
        0.00000000000000,      1.76460555591805e-14,  -0.642039521920233,
        0.642039521920208,     -1.61803398874991,     -3.79696274421804e-14,
        -1.39680224666739,     -1.39680224666746,     6.15063555642337e-14,
        -1.90211303259030,     1.00000000000000,      -0.999999999999998,
        0.618033988749889,     3.44169137633799e-15,  -0.221231742082481,
        -0.221231742082485,    1.69864122767649e-14,  -1.17557050458496,
        1.26007351067013,      -1.26007351067008,     2.00000000000000,
        4.65613375930630e-14,  1.26007351067006,      1.26007351067013,
        -3.77475828372553e-14, 1.17557050458492,      -0.221231742082452,
        0.221231742082436,     0.618033988749901,     3.33066907387547e-15,
        0.999999999999996,     1.00000000000002,      -2.70339306496226e-14,
        1.90211303259031,      -1.39680224666740,     1.39680224666745,
        -1.61803398874993,     7.77156117237610e-14,  -0.642039521920217,
        -0.642039521920207,    0.00000000000000,      -4.70375787387170e-14,
        -0.642039521920207,    0.642039521920206,     -1.61803398874987,
        4.91828799908944e-14,  -1.39680224666741,     -1.39680224666744,
        -4.09672296086683e-14, -1.90211303259032,     1.00000000000001,
        -0.999999999999971,    0.618033988749909,     -7.88258347483861e-15,
        -0.221231742082447,    -0.221231742082428,    -4.55191440096314e-15,
        -1.17557050458494,     1.26007351067004,      -1.26007351067013,
        2.00000000000000,      9.80955400591059e-15,  1.26007351067014,
        1.26007351067008,      -1.60982338570648e-14, 1.17557050458493,
        -0.221231742082485,    0.221231742082493,     0.618033988749921,
        1.38777878078145e-14,  1.00000000000000,      0.999999999999986,
        7.54396545232794e-14,  1.90211303259029,      -1.39680224666742,
        1.39680224666742,      -1.61803398874992,     4.99600361081320e-14,
        -0.642039521920193,    -0.642039521920205,    0.00000000000000,
        -2.64560847454024e-14, -0.642039521920231,    0.642039521920208,
        -1.61803398874989,     2.14273043752655e-14,  -1.39680224666739,
        -1.39680224666746,     -8.38218383591993e-15, -1.90211303259031,
        1.00000000000001,      -0.999999999999943,    0.618033988749890,
        2.77555756156289e-15,  -0.221231742082458,    -0.221231742082446,
        1.55431223447522e-14,  -1.17557050458496,     1.26007351067007,
        -1.26007351067012,     2.00000000000000,      4.41120439947683e-14,
        1.26007351067012,      1.26007351067009,      -3.63042929052426e-14,
        1.17557050458492,      -0.221231742082474,    0.221231742082475,
        0.618033988749940,     2.45359288442160e-14,  0.999999999999997,
        1.00000000000001,      4.28546087505310e-14,  1.90211303259030,
        -1.39680224666744,     1.39680224666739,      -1.61803398874990,
        2.22044604925031e-14,  -0.642039521920170,    -0.642039521920203,
        0.00000000000000,      -5.87459075208776e-15, -0.642039521920255,
        0.642039521920210,     -1.61803398874990,     -6.32827124036339e-15,
        -1.39680224666737,     -1.39680224666749,     2.42583730880597e-14,
        -1.90211303259030,     0.999999999999993,     -1.00000000000003,
        0.618033988749870,     1.33226762955019e-14,  -0.221231742082468,
        -0.221231742082464,    3.57491813929300e-14,  -1.17557050458498,
        1.26007351067010,      -1.26007351067010,     2.00000000000000,
        7.84145339836259e-14,  1.26007351067009,      1.26007351067011,
        -5.65103519534205e-14, 1.17557050458490,      -0.221231742082464,
        0.221231742082456,     0.618033988749879,     -8.77076189453874e-15,
        0.999999999999990,     1.00000000000004,      1.02140518265514e-14,
        1.90211303259031,      -1.39680224666746,     1.39680224666737,
        -1.61803398874989,     -5.55111512312578e-15, -0.642039521920245,
        -0.642039521920209,    0.00000000000000,      1.47069032412268e-14,
        -0.642039521920180,    0.642039521920204,     -1.61803398874986,
        8.09352584951739e-14,  -1.39680224666743,     -1.39680224666741,
        -7.83262343873048e-14, -1.90211303259032,     1.00000000000000,
        -1.00000000000000,     0.618033988749932,     -1.99840144432528e-14,
        -0.221231742082479,    -0.221231742082482,    -2.76445533131664e-14,
        -1.17557050458492,     1.26007351067013,      -1.26007351067009,
        2.00000000000000,      -2.93915231795365e-14, 1.26007351067018,
        1.26007351067006,      6.88338275267597e-15,  1.17557050458495,
        -0.221231742082497,    0.221231742082513,     0.618033988749898,
        1.88737914186277e-15,  1.00000000000001,      0.999999999999955,
        -2.23709939461969e-14, 1.90211303259031,      -1.39680224666740,
        1.39680224666745,      -1.61803398874988,     -3.33066907387547e-14,
        -0.642039521920221,    -0.642039521920207,    0.00000000000000,
        3.52883972345414e-14,  -0.642039521920204,    0.642039521920206,
        -1.61803398874987,     5.31796828795450e-14,  -1.39680224666741,
        -1.39680224666743,     -4.56856774633252e-14, -1.90211303259032,
        1.00000000000001,      -0.999999999999975,    0.618033988749912,
        -9.32587340685132e-15, -0.221231742082490,    -0.221231742082501,
        -7.54951656745106e-15, -1.17557050458494,     1.26007351067016,
        -1.26007351067007,     2.00000000000000,      4.91096680932118e-15,
        1.26007351067015,      1.26007351067008,      -1.32116539930394e-14,
        1.17557050458494,      -0.221231742082487,    0.221231742082495,
        0.618033988749918,     1.24344978758018e-14,  1.00000000000000,
        0.999999999999982,     -5.50115508701765e-14, 1.90211303259032,
        -1.39680224666742,     1.39680224666742,      -1.61803398874987,
        -6.10622663543836e-14, -0.642039521920197,    -0.642039521920205,
        0.00000000000000,      -2.93952370633560e-14, -0.642039521920228,
        0.642039521920208};
    uint8_t ifftFlag = 0, doBitReverse = 1;
    BENCH_START(riscv_cfft_f32);
    riscv_cfft_f32(&riscv_cfft_sR_f32_len512, cfft_testinput_f32_50hz_200Hz,
                 ifftFlag, doBitReverse);
    BENCH_END(riscv_cfft_f32);
    ref_cfft_f32(&riscv_cfft_sR_f32_len512, cfft_testinput_f32_50hz_200Hz_ref,
                 ifftFlag, doBitReverse);
    float32_t resault, resault_ref;
    uint32_t index, index_ref;
    riscv_max_f32(cfft_testinput_f32_50hz_200Hz, 1024, &resault, &index);
    riscv_max_f32(cfft_testinput_f32_50hz_200Hz_ref, 1024, &resault_ref,
                &index_ref);
    if (index != index_ref) {
        BENCH_ERROR(riscv_cfft_f32);
        printf("expect: %d, actual: %d\n", index_ref, index);
        test_flag_error = 1;
    }
    BENCH_STATUS(riscv_cfft_f32);
}
static int DSP_cfft_q31(void)
{
    uint16_t i;
    float32_t cfft_testinput_f32_50hz_200Hz[1024] = {
        2.00000000000000,      0.00000000000000,      1.26007351067010,
        1.26007351067010,      1.11022302462516e-16,  1.17557050458495,
        -0.221231742082474,    0.221231742082474,     0.618033988749895,
        -1.11022302462516e-16, 1.00000000000000,      1.00000000000000,
        -7.21644966006352e-16, 1.90211303259031,      -1.39680224666742,
        1.39680224666742,      -1.61803398874990,     4.44089209850063e-16,
        -0.642039521920207,    -0.642039521920206,    0.00000000000000,
        -3.67394039744206e-16, -0.642039521920206,    0.642039521920206,
        -1.61803398874990,     -1.22124532708767e-15, -1.39680224666742,
        -1.39680224666742,     -7.77156117237610e-16, -1.90211303259031,
        1.00000000000000,      -1.00000000000000,     0.618033988749895,
        -3.33066907387547e-16, -0.221231742082475,    -0.221231742082476,
        -5.55111512312578e-16, -1.17557050458495,     1.26007351067010,
        -1.26007351067010,     2.00000000000000,      -1.22464679914735e-15,
        1.26007351067010,      1.26007351067010,      7.77156117237610e-16,
        1.17557050458495,      -0.221231742082475,    0.221231742082475,
        0.618033988749897,     8.88178419700125e-16,  0.999999999999999,
        1.00000000000000,      1.49880108324396e-15,  1.90211303259031,
        -1.39680224666742,     1.39680224666742,      -1.61803398874990,
        1.33226762955019e-15,  -0.642039521920207,    -0.642039521920206,
        0.00000000000000,      -1.10218211923262e-15, -0.642039521920205,
        0.642039521920206,     -1.61803398874989,     1.55431223447522e-15,
        -1.39680224666742,     -1.39680224666743,     6.49480469405717e-15,
        -1.90211303259031,     1.00000000000000,      -0.999999999999995,
        0.618033988749896,     -7.77156117237610e-16, -0.221231742082474,
        -0.221231742082473,    -1.44328993201270e-15, -1.17557050458495,
        1.26007351067010,      -1.26007351067010,     2.00000000000000,
        -2.44929359829471e-15, 1.26007351067010,      1.26007351067010,
        -3.77475828372553e-15, 1.17557050458494,      -0.221231742082475,
        0.221231742082476,     0.618033988749893,     -7.77156117237610e-16,
        1.00000000000000,      0.999999999999998,     2.66453525910038e-15,
        1.90211303259031,      -1.39680224666742,     1.39680224666742,
        -1.61803398874989,     -4.88498130835069e-15, -0.642039521920202,
        -0.642039521920206,    0.00000000000000,      3.49210031947972e-15,
        -0.642039521920198,    0.642039521920206,     -1.61803398874989,
        2.55351295663786e-15,  -1.39680224666742,     -1.39680224666742,
        -3.16413562018170e-15, -1.90211303259031,     1.00000000000000,
        -0.999999999999996,    0.618033988749897,     -9.99200722162641e-16,
        -0.221231742082476,    -0.221231742082477,    -2.10942374678780e-15,
        -1.17557050458494,     1.26007351067009,      -1.26007351067011,
        2.00000000000000,      -3.67394039744206e-15, 1.26007351067010,
        1.26007351067010,      2.22044604925031e-15,  1.17557050458495,
        -0.221231742082473,    0.221231742082472,     0.618033988749893,
        -1.22124532708767e-15, 0.999999999999999,     1.00000000000000,
        -1.31006316905768e-14, 1.90211303259031,      -1.39680224666742,
        1.39680224666742,      -1.61803398874989,     -1.09912079437891e-14,
        -0.642039521920203,    -0.642039521920206,    0.00000000000000,
        8.08638275819206e-15,  -0.642039521920197,    0.642039521920205,
        -1.61803398874989,     3.55271367880050e-15,  -1.39680224666743,
        -1.39680224666741,     -4.32986979603811e-15, -1.90211303259031,
        1.00000000000000,      -0.999999999999997,    0.618033988749898,
        -1.44328993201270e-15, -0.221231742082476,    -0.221231742082476,
        -2.77555756156289e-15, -1.17557050458494,     1.26007351067010,
        -1.26007351067010,     2.00000000000000,      -4.89858719658941e-15,
        1.26007351067010,      1.26007351067010,      -7.54951656745106e-15,
        1.17557050458494,      -0.221231742082473,    0.221231742082472,
        0.618033988749902,     3.88578058618805e-15,  0.999999999999999,
        1.00000000000000,      5.05151476204446e-15,  1.90211303259031,
        -1.39680224666741,     1.39680224666743,      -1.61803398874990,
        4.44089209850063e-15,  -0.642039521920216,    -0.642039521920207,
        0.00000000000000,      -3.30654635769785e-15, -0.642039521920209,
        0.642039521920206,     -1.61803398874989,     4.55191440096314e-15,
        -1.39680224666742,     -1.39680224666742,     -5.44009282066327e-15,
        -1.90211303259031,     1.00000000000000,      -0.999999999999998,
        0.618033988749888,     3.66373598126302e-15,  -0.221231742082475,
        -0.221231742082476,    6.88338275267597e-15,  -1.17557050458495,
        1.26007351067010,      -1.26007351067010,     2.00000000000000,
        1.16403343982657e-14,  1.26007351067010,      1.26007351067010,
        1.40998324127395e-14,  1.17557050458496,      -0.221231742082479,
        0.221231742082482,     0.618033988749891,     -1.99840144432528e-15,
        1.00000000000000,      1.00000000000000,      -1.07136521876328e-14,
        1.90211303259031,      -1.39680224666741,     1.39680224666743,
        -1.61803398874990,     5.44009282066327e-15,  -0.642039521920205,
        -0.642039521920206,    0.00000000000000,      6.61680659921524e-15,
        -0.642039521920220,    0.642039521920207,     -1.61803398874989,
        5.55111512312578e-15,  -1.39680224666742,     -1.39680224666742,
        1.02140518265514e-14,  -1.90211303259031,     1.00000000000000,
        -0.999999999999984,    0.618033988749899,     -2.10942374678780e-15,
        -0.221231742082475,    -0.221231742082475,    -1.47659662275146e-14,
        -1.17557050458493,     1.26007351067009,      -1.26007351067011,
        2.00000000000000,      -7.34788079488412e-15, 1.26007351067010,
        1.26007351067010,      -5.99520433297585e-15, 1.17557050458494,
        -0.221231742082479,    0.221231742082483,     0.618033988749891,
        -2.33146835171283e-15, 1.00000000000000,      1.00000000000000,
        -9.54791801177635e-15, 1.90211303259031,      -1.39680224666743,
        1.39680224666741,      -1.61803398874990,     6.32827124036339e-15,
        -0.642039521920206,    -0.642039521920206,    0.00000000000000,
        5.88201851972683e-15,  -0.642039521920219,    0.642039521920207,
        -1.61803398874990,     -2.22044604925031e-14, -1.39680224666742,
        -1.39680224666742,     9.10382880192628e-15,  -1.90211303259031,
        1.00000000000000,      -0.999999999999985,    0.618033988749879,
        8.43769498715119e-15,  -0.221231742082474,    -0.221231742082475,
        5.55111512312578e-15,  -1.17557050458495,     1.26007351067012,
        -1.26007351067009,     2.00000000000000,      2.69546091939735e-14,
        1.26007351067013,      1.26007351067009,      1.55431223447522e-14,
        1.17557050458496,      -0.221231742082480,    0.221231742082484,
        0.618033988749890,     -2.77555756156289e-15, 1.00000000000000,
        1.00000000000000,      2.54241072639161e-14,  1.90211303259030,
        -1.39680224666741,     1.39680224666743,      -1.61803398874990,
        7.32747196252603e-15,  -0.642039521920206,    -0.642039521920206,
        0.00000000000000,      5.14723044023841e-15,  -0.642039521920193,
        0.642039521920205,     -1.61803398874989,     7.54951656745106e-15,
        -1.39680224666742,     -1.39680224666742,     7.93809462606987e-15,
        -1.90211303259031,     1.00000000000000,      -0.999999999999986,
        0.618033988749900,     -2.99760216648792e-15, -0.221231742082474,
        -0.221231742082474,    4.77395900588817e-15,  -1.17557050458495,
        1.26007351067011,      -1.26007351067009,     2.00000000000000,
        -9.79717439317883e-15, 1.26007351067010,      1.26007351067010,
        -4.55191440096314e-15, 1.17557050458494,      -0.221231742082469,
        0.221231742082465,     0.618033988749909,     7.88258347483861e-15,
        1.00000000000000,      0.999999999999999,     -7.27196081129478e-15,
        1.90211303259031,      -1.39680224666743,     1.39680224666741,
        -1.61803398874989,     -2.04281036531029e-14, -0.642039521920182,
        -0.642039521920204,    0.00000000000000,      4.41244236075000e-15,
        -0.642039521920217,    0.642039521920207,     -1.61803398874989,
        8.43769498715119e-15,  -1.39680224666742,     -1.39680224666742,
        -2.70339306496226e-14, -1.90211303259031,     0.999999999999996,
        -1.00000000000002,     0.618033988749901,     -3.33066907387547e-15,
        -0.221231742082474,    -0.221231742082473,    -1.68753899743024e-14,
        -1.17557050458493,     1.26007351067008,      -1.26007351067011,
        2.00000000000000,      -1.10218211923262e-14, 1.26007351067010,
        1.26007351067010,      -3.88578058618805e-15, 1.17557050458494,
        -0.221231742082481,    0.221231742082485,     0.618033988749889,
        -3.44169137633799e-15, 1.00000000000000,      0.999999999999998,
        -6.05071548420710e-15, 1.90211303259031,      -1.39680224666743,
        1.39680224666741,      -1.61803398874990,     9.32587340685132e-15,
        -0.642039521920208,    -0.642039521920206,    0.00000000000000,
        3.67765428126159e-15,  -0.642039521920217,    0.642039521920207,
        -1.61803398874990,     -1.93178806284777e-14, -1.39680224666742,
        -1.39680224666742,     5.60662627435704e-15,  -1.90211303259031,
        1.00000000000000,      -0.999999999999988,    0.618033988749881,
        7.32747196252603e-15,  -0.221231742082484,    -0.221231742082492,
        3.33066907387547e-15,  -1.17557050458495,     1.26007351067011,
        -1.26007351067009,     2.00000000000000,      2.32806687965315e-14,
        1.26007351067007,      1.26007351067012,      -3.21964677141295e-15,
        1.17557050458494,      -0.221231742082470,    0.221231742082467,
        0.618033988749867,     -1.47659662275146e-14, 1.00000000000001,
        0.999999999999969,     2.89213097914853e-14,  1.90211303259030,
        -1.39680224666741,     1.39680224666744,      -1.61803398874990,
        1.02140518265514e-14,  -0.642039521920209,    -0.642039521920206,
        0.00000000000000,      2.94286620177318e-15,  -0.642039521920216,
        0.642039521920207,     -1.61803398874990,     -1.83186799063151e-14,
        -1.39680224666745,     -1.39680224666739,     -2.93653990013354e-14,
        -1.90211303259031,     0.999999999999996,     -1.00000000000002,
        0.618033988749903,     -4.10782519111308e-15, -0.221231742082473,
        -0.221231742082472,    2.55351295663786e-15,  -1.17557050458495,
        1.26007351067011,      -1.26007351067010,     2.00000000000000,
        2.20560219973841e-14,  1.26007351067008,      1.26007351067011,
        -2.33146835171283e-14, 1.17557050458493,      -0.221231742082481,
        0.221231742082486,     0.618033988749887,     -4.21884749357560e-15,
        1.00000000000000,      0.999999999999996,     -3.71924713249427e-15,
        1.90211303259031,      -1.39680224666743,     1.39680224666741,
        -1.61803398874989,     -1.75415237890775e-14, -0.642039521920185,
        -0.642039521920204,    0.00000000000000,      2.35243601950878e-14,
        -0.642039521920240,    0.642039521920209,     -1.61803398874989,
        1.15463194561016e-14,  -1.39680224666742,     -1.39680224666742,
        3.27515792264421e-15,  -1.90211303259031,     1.00000000000000,
        -0.999999999999990,    0.618033988749923,     -1.54321000422897e-14,
        -0.221231742082462,    -0.221231742082452,    -1.89848137210902e-14,
        -1.17557050458493,     1.26007351067008,      -1.26007351067011,
        2.00000000000000,      -1.46957615897682e-14, 1.26007351067011,
        1.26007351067010,      -1.66533453693773e-15, 1.17557050458495,
        -0.221231742082471,    0.221231742082468,     0.618033988749907,
        6.32827124036339e-15,  0.999999999999994,     1.00000000000002,
        3.11972669919669e-14,  1.90211303259030,      -1.39680224666741,
        1.39680224666744,      -1.61803398874990,     1.23234755733392e-14,
        -0.642039521920211,    -0.642039521920207,    0.00000000000000,
        1.47329004279635e-15,  -0.642039521920214,    0.642039521920207,
        -1.61803398874990,     -1.62092561595273e-14, -1.39680224666740,
        -1.39680224666744,     3.59157148466238e-14,  -1.90211303259030,
        0.999999999999995,     -1.00000000000002,     0.618033988749904,
        -4.88498130835069e-15, -0.221231742082472,    -0.221231742082471,
        1.11022302462516e-15,  -1.17557050458495,     1.26007351067011,
        -1.26007351067010,     2.00000000000000,      1.96067283990894e-14,
        1.26007351067008,      1.26007351067011,      -2.18713935851156e-14,
        1.17557050458493,      -0.221231742082460,    0.221231742082450,
        0.618033988749926,     1.69864122767649e-14,  1.00000000000000,
        0.999999999999994,     -1.44328993201270e-15, 1.90211303259031,
        -1.39680224666743,     1.39680224666741,      -1.61803398874989,
        -1.54321000422897e-14, -0.642039521920187,    -0.642039521920205,
        0.00000000000000,      2.20547840361110e-14,  -0.642039521920238,
        0.642039521920209,     -1.61803398874991,     -4.39648317751562e-14,
        -1.39680224666738,     -1.39680224666747,     9.43689570931383e-16,
        -1.90211303259031,     1.00000000000000,      -0.999999999999992,
        0.618033988749884,     5.77315972805081e-15,  -0.221231742082483,
        -0.221231742082489,    2.13162820728030e-14,  -1.17557050458496,
        1.26007351067014,      -1.26007351067008,     2.00000000000000,
        5.39092183879471e-14,  1.26007351067005,      1.26007351067013,
        4.14113188185183e-14,  1.17557050458498,      -0.221231742082493,
        0.221231742082507,     0.618033988749865,     -1.63202784619898e-14,
        1.00000000000001,      0.999999999999965,     3.35287353436797e-14,
        1.90211303259030,      -1.39680224666740,     1.39680224666744,
        -1.61803398874990,     1.43218770176645e-14,  -0.642039521920212,
        -0.642039521920207,    0.00000000000000,      3.71388381953015e-18,
        -0.642039521920163,    0.642039521920203,     -1.61803398874988,
        4.31876756579186e-14,  -1.39680224666745,     -1.39680224666739,
        -3.40283357047611e-14, -1.90211303259031,     0.999999999999995,
        -1.00000000000002,     0.618033988749905,     -5.55111512312578e-15,
        -0.221231742082471,    -0.221231742082469,    -3.33066907387547e-16,
        -1.17557050458495,     1.26007351067011,      -1.26007351067010,
        2.00000000000000,      1.71574348007947e-14,  1.26007351067014,
        1.26007351067008,      2.13162820728030e-14,  1.17557050458496,
        -0.221231742082483,    0.221231742082489,     0.618033988749884,
        -5.77315972805081e-15, 1.00000000000000,      0.999999999999992,
        9.43689570931383e-16,  1.90211303259031,      -1.39680224666743,
        1.39680224666741,      -1.61803398874989,     -1.34336985979644e-14,
        -0.642039521920188,    -0.642039521920205,    0.00000000000000,
        2.05852078771341e-14,  -0.642039521920187,    0.642039521920205,
        -1.61803398874989,     1.54321000422897e-14,  -1.39680224666743,
        -1.39680224666741,     -1.44328993201270e-15, -1.90211303259031,
        1.00000000000000,      -0.999999999999994,    0.618033988749886,
        4.99600361081320e-15,  -0.221231742082482,    -0.221231742082488,
        1.99840144432528e-14,  -1.17557050458496,     1.26007351067014,
        -1.26007351067008,     2.00000000000000,      -1.95943487863577e-14,
        1.26007351067011,      1.26007351067010,      1.11022302462516e-15,
        1.17557050458495,      -0.221231742082472,    0.221231742082471,
        0.618033988749904,     4.88498130835069e-15,  0.999999999999995,
        1.00000000000002,      -3.16968673530482e-14, 1.90211303259031,
        -1.39680224666745,     1.39680224666739,      -1.61803398874988,
        -4.11892742135933e-14, -0.642039521920164,    -0.642039521920203,
        0.00000000000000,      -1.46586227515729e-15, -0.642039521920211,
        0.642039521920207,     -1.61803398874990,     -1.23234755733392e-14,
        -1.39680224666741,     -1.39680224666744,     3.12527781431982e-14,
        -1.90211303259030,     1.00000000000001,      -0.999999999999967,
        0.618033988749866,     1.56541446472147e-14,  -0.221231742082493,
        -0.221231742082506,    4.00790511889682e-14,  -1.17557050458498,
        1.26007351067011,      -1.26007351067010,     2.00000000000000,
        1.47081412025000e-14,  1.26007351067008,      1.26007351067011,
        -1.89848137210902e-14, 1.17557050458493,      -0.221231742082462,
        0.221231742082452,     0.618033988749883,     -6.43929354282591e-15,
        1.00000000000000,      0.999999999999990,     3.21964677141295e-15,
        1.90211303259031,      -1.39680224666738,     1.39680224666747,
        -1.61803398874991,     4.59632332194815e-14,  -0.642039521920240,
        -0.642039521920209,    0.00000000000000,      -2.35169324274487e-14,
        -0.642039521920185,    0.642039521920204,     -1.61803398874989,
        1.75415237890775e-14,  -1.39680224666743,     -1.39680224666741,
        -3.71924713249427e-15, -1.90211303259031,     1.00000000000000,
        -0.999999999999996,    0.618033988749928,     -1.76525460915400e-14,
        -0.221231742082459,    -0.221231742082449,    -2.33146835171283e-14,
        -1.17557050458493,     1.26007351067008,      -1.26007351067011,
        2.00000000000000,      -2.20436423846524e-14, 1.26007351067011,
        1.26007351067010,      2.55351295663786e-15,  1.17557050458495,
        -0.221231742082473,    0.221231742082472,     0.618033988749903,
        4.10782519111308e-15,  0.999999999999996,     1.00000000000002,
        3.81916720471054e-14,  1.90211303259030,      -1.39680224666740,
        1.39680224666744,      -1.61803398874990,     1.82076576038526e-14,
        -0.642039521920216,    -0.642039521920207,    0.00000000000000,
        -2.93543843413412e-15, -0.642039521920209,    0.642039521920206,
        -1.61803398874990,     -1.02140518265514e-14, -1.39680224666741,
        -1.39680224666744,     2.89213097914853e-14,  -1.90211303259030,
        0.999999999999994,     -1.00000000000003,     0.618033988749908,
        -7.10542735760100e-15, -0.221231742082470,    -0.221231742082467,
        -3.21964677141295e-15, -1.17557050458494,     1.26007351067010,
        -1.26007351067010,     2.00000000000000,      1.22588476042053e-14,
        1.26007351067008,      1.26007351067011,      -1.75415237890775e-14,
        1.17557050458493,      -0.221231742082462,    0.221231742082454,
        0.618033988749922,     1.46549439250521e-14,  1.00000000000000,
        0.999999999999988,     5.60662627435704e-15,  1.90211303259031,
        -1.39680224666742,     1.39680224666742,      -1.61803398874989,
        -9.43689570931383e-15, -0.642039521920192,    -0.642039521920205,
        0.00000000000000,      1.76460555591805e-14,  -0.642039521920233,
        0.642039521920208,     -1.61803398874991,     -3.79696274421804e-14,
        -1.39680224666739,     -1.39680224666746,     6.15063555642337e-14,
        -1.90211303259030,     1.00000000000000,      -0.999999999999998,
        0.618033988749889,     3.44169137633799e-15,  -0.221231742082481,
        -0.221231742082485,    1.69864122767649e-14,  -1.17557050458496,
        1.26007351067013,      -1.26007351067008,     2.00000000000000,
        4.65613375930630e-14,  1.26007351067006,      1.26007351067013,
        -3.77475828372553e-14, 1.17557050458492,      -0.221231742082452,
        0.221231742082436,     0.618033988749901,     3.33066907387547e-15,
        0.999999999999996,     1.00000000000002,      -2.70339306496226e-14,
        1.90211303259031,      -1.39680224666740,     1.39680224666745,
        -1.61803398874993,     7.77156117237610e-14,  -0.642039521920217,
        -0.642039521920207,    0.00000000000000,      -4.70375787387170e-14,
        -0.642039521920207,    0.642039521920206,     -1.61803398874987,
        4.91828799908944e-14,  -1.39680224666741,     -1.39680224666744,
        -4.09672296086683e-14, -1.90211303259032,     1.00000000000001,
        -0.999999999999971,    0.618033988749909,     -7.88258347483861e-15,
        -0.221231742082447,    -0.221231742082428,    -4.55191440096314e-15,
        -1.17557050458494,     1.26007351067004,      -1.26007351067013,
        2.00000000000000,      9.80955400591059e-15,  1.26007351067014,
        1.26007351067008,      -1.60982338570648e-14, 1.17557050458493,
        -0.221231742082485,    0.221231742082493,     0.618033988749921,
        1.38777878078145e-14,  1.00000000000000,      0.999999999999986,
        7.54396545232794e-14,  1.90211303259029,      -1.39680224666742,
        1.39680224666742,      -1.61803398874992,     4.99600361081320e-14,
        -0.642039521920193,    -0.642039521920205,    0.00000000000000,
        -2.64560847454024e-14, -0.642039521920231,    0.642039521920208,
        -1.61803398874989,     2.14273043752655e-14,  -1.39680224666739,
        -1.39680224666746,     -8.38218383591993e-15, -1.90211303259031,
        1.00000000000001,      -0.999999999999943,    0.618033988749890,
        2.77555756156289e-15,  -0.221231742082458,    -0.221231742082446,
        1.55431223447522e-14,  -1.17557050458496,     1.26007351067007,
        -1.26007351067012,     2.00000000000000,      4.41120439947683e-14,
        1.26007351067012,      1.26007351067009,      -3.63042929052426e-14,
        1.17557050458492,      -0.221231742082474,    0.221231742082475,
        0.618033988749940,     2.45359288442160e-14,  0.999999999999997,
        1.00000000000001,      4.28546087505310e-14,  1.90211303259030,
        -1.39680224666744,     1.39680224666739,      -1.61803398874990,
        2.22044604925031e-14,  -0.642039521920170,    -0.642039521920203,
        0.00000000000000,      -5.87459075208776e-15, -0.642039521920255,
        0.642039521920210,     -1.61803398874990,     -6.32827124036339e-15,
        -1.39680224666737,     -1.39680224666749,     2.42583730880597e-14,
        -1.90211303259030,     0.999999999999993,     -1.00000000000003,
        0.618033988749870,     1.33226762955019e-14,  -0.221231742082468,
        -0.221231742082464,    3.57491813929300e-14,  -1.17557050458498,
        1.26007351067010,      -1.26007351067010,     2.00000000000000,
        7.84145339836259e-14,  1.26007351067009,      1.26007351067011,
        -5.65103519534205e-14, 1.17557050458490,      -0.221231742082464,
        0.221231742082456,     0.618033988749879,     -8.77076189453874e-15,
        0.999999999999990,     1.00000000000004,      1.02140518265514e-14,
        1.90211303259031,      -1.39680224666746,     1.39680224666737,
        -1.61803398874989,     -5.55111512312578e-15, -0.642039521920245,
        -0.642039521920209,    0.00000000000000,      1.47069032412268e-14,
        -0.642039521920180,    0.642039521920204,     -1.61803398874986,
        8.09352584951739e-14,  -1.39680224666743,     -1.39680224666741,
        -7.83262343873048e-14, -1.90211303259032,     1.00000000000000,
        -1.00000000000000,     0.618033988749932,     -1.99840144432528e-14,
        -0.221231742082479,    -0.221231742082482,    -2.76445533131664e-14,
        -1.17557050458492,     1.26007351067013,      -1.26007351067009,
        2.00000000000000,      -2.93915231795365e-14, 1.26007351067018,
        1.26007351067006,      6.88338275267597e-15,  1.17557050458495,
        -0.221231742082497,    0.221231742082513,     0.618033988749898,
        1.88737914186277e-15,  1.00000000000001,      0.999999999999955,
        -2.23709939461969e-14, 1.90211303259031,      -1.39680224666740,
        1.39680224666745,      -1.61803398874988,     -3.33066907387547e-14,
        -0.642039521920221,    -0.642039521920207,    0.00000000000000,
        3.52883972345414e-14,  -0.642039521920204,    0.642039521920206,
        -1.61803398874987,     5.31796828795450e-14,  -1.39680224666741,
        -1.39680224666743,     -4.56856774633252e-14, -1.90211303259032,
        1.00000000000001,      -0.999999999999975,    0.618033988749912,
        -9.32587340685132e-15, -0.221231742082490,    -0.221231742082501,
        -7.54951656745106e-15, -1.17557050458494,     1.26007351067016,
        -1.26007351067007,     2.00000000000000,      4.91096680932118e-15,
        1.26007351067015,      1.26007351067008,      -1.32116539930394e-14,
        1.17557050458494,      -0.221231742082487,    0.221231742082495,
        0.618033988749918,     1.24344978758018e-14,  1.00000000000000,
        0.999999999999982,     -5.50115508701765e-14, 1.90211303259032,
        -1.39680224666742,     1.39680224666742,      -1.61803398874987,
        -6.10622663543836e-14, -0.642039521920197,    -0.642039521920205,
        0.00000000000000,      -2.93952370633560e-14, -0.642039521920228,
        0.642039521920208};
    float32_t cfft_testinput_f32_50hz_200Hz_ref[1024] = {
        2.00000000000000,      0.00000000000000,      1.26007351067010,
        1.26007351067010,      1.11022302462516e-16,  1.17557050458495,
        -0.221231742082474,    0.221231742082474,     0.618033988749895,
        -1.11022302462516e-16, 1.00000000000000,      1.00000000000000,
        -7.21644966006352e-16, 1.90211303259031,      -1.39680224666742,
        1.39680224666742,      -1.61803398874990,     4.44089209850063e-16,
        -0.642039521920207,    -0.642039521920206,    0.00000000000000,
        -3.67394039744206e-16, -0.642039521920206,    0.642039521920206,
        -1.61803398874990,     -1.22124532708767e-15, -1.39680224666742,
        -1.39680224666742,     -7.77156117237610e-16, -1.90211303259031,
        1.00000000000000,      -1.00000000000000,     0.618033988749895,
        -3.33066907387547e-16, -0.221231742082475,    -0.221231742082476,
        -5.55111512312578e-16, -1.17557050458495,     1.26007351067010,
        -1.26007351067010,     2.00000000000000,      -1.22464679914735e-15,
        1.26007351067010,      1.26007351067010,      7.77156117237610e-16,
        1.17557050458495,      -0.221231742082475,    0.221231742082475,
        0.618033988749897,     8.88178419700125e-16,  0.999999999999999,
        1.00000000000000,      1.49880108324396e-15,  1.90211303259031,
        -1.39680224666742,     1.39680224666742,      -1.61803398874990,
        1.33226762955019e-15,  -0.642039521920207,    -0.642039521920206,
        0.00000000000000,      -1.10218211923262e-15, -0.642039521920205,
        0.642039521920206,     -1.61803398874989,     1.55431223447522e-15,
        -1.39680224666742,     -1.39680224666743,     6.49480469405717e-15,
        -1.90211303259031,     1.00000000000000,      -0.999999999999995,
        0.618033988749896,     -7.77156117237610e-16, -0.221231742082474,
        -0.221231742082473,    -1.44328993201270e-15, -1.17557050458495,
        1.26007351067010,      -1.26007351067010,     2.00000000000000,
        -2.44929359829471e-15, 1.26007351067010,      1.26007351067010,
        -3.77475828372553e-15, 1.17557050458494,      -0.221231742082475,
        0.221231742082476,     0.618033988749893,     -7.77156117237610e-16,
        1.00000000000000,      0.999999999999998,     2.66453525910038e-15,
        1.90211303259031,      -1.39680224666742,     1.39680224666742,
        -1.61803398874989,     -4.88498130835069e-15, -0.642039521920202,
        -0.642039521920206,    0.00000000000000,      3.49210031947972e-15,
        -0.642039521920198,    0.642039521920206,     -1.61803398874989,
        2.55351295663786e-15,  -1.39680224666742,     -1.39680224666742,
        -3.16413562018170e-15, -1.90211303259031,     1.00000000000000,
        -0.999999999999996,    0.618033988749897,     -9.99200722162641e-16,
        -0.221231742082476,    -0.221231742082477,    -2.10942374678780e-15,
        -1.17557050458494,     1.26007351067009,      -1.26007351067011,
        2.00000000000000,      -3.67394039744206e-15, 1.26007351067010,
        1.26007351067010,      2.22044604925031e-15,  1.17557050458495,
        -0.221231742082473,    0.221231742082472,     0.618033988749893,
        -1.22124532708767e-15, 0.999999999999999,     1.00000000000000,
        -1.31006316905768e-14, 1.90211303259031,      -1.39680224666742,
        1.39680224666742,      -1.61803398874989,     -1.09912079437891e-14,
        -0.642039521920203,    -0.642039521920206,    0.00000000000000,
        8.08638275819206e-15,  -0.642039521920197,    0.642039521920205,
        -1.61803398874989,     3.55271367880050e-15,  -1.39680224666743,
        -1.39680224666741,     -4.32986979603811e-15, -1.90211303259031,
        1.00000000000000,      -0.999999999999997,    0.618033988749898,
        -1.44328993201270e-15, -0.221231742082476,    -0.221231742082476,
        -2.77555756156289e-15, -1.17557050458494,     1.26007351067010,
        -1.26007351067010,     2.00000000000000,      -4.89858719658941e-15,
        1.26007351067010,      1.26007351067010,      -7.54951656745106e-15,
        1.17557050458494,      -0.221231742082473,    0.221231742082472,
        0.618033988749902,     3.88578058618805e-15,  0.999999999999999,
        1.00000000000000,      5.05151476204446e-15,  1.90211303259031,
        -1.39680224666741,     1.39680224666743,      -1.61803398874990,
        4.44089209850063e-15,  -0.642039521920216,    -0.642039521920207,
        0.00000000000000,      -3.30654635769785e-15, -0.642039521920209,
        0.642039521920206,     -1.61803398874989,     4.55191440096314e-15,
        -1.39680224666742,     -1.39680224666742,     -5.44009282066327e-15,
        -1.90211303259031,     1.00000000000000,      -0.999999999999998,
        0.618033988749888,     3.66373598126302e-15,  -0.221231742082475,
        -0.221231742082476,    6.88338275267597e-15,  -1.17557050458495,
        1.26007351067010,      -1.26007351067010,     2.00000000000000,
        1.16403343982657e-14,  1.26007351067010,      1.26007351067010,
        1.40998324127395e-14,  1.17557050458496,      -0.221231742082479,
        0.221231742082482,     0.618033988749891,     -1.99840144432528e-15,
        1.00000000000000,      1.00000000000000,      -1.07136521876328e-14,
        1.90211303259031,      -1.39680224666741,     1.39680224666743,
        -1.61803398874990,     5.44009282066327e-15,  -0.642039521920205,
        -0.642039521920206,    0.00000000000000,      6.61680659921524e-15,
        -0.642039521920220,    0.642039521920207,     -1.61803398874989,
        5.55111512312578e-15,  -1.39680224666742,     -1.39680224666742,
        1.02140518265514e-14,  -1.90211303259031,     1.00000000000000,
        -0.999999999999984,    0.618033988749899,     -2.10942374678780e-15,
        -0.221231742082475,    -0.221231742082475,    -1.47659662275146e-14,
        -1.17557050458493,     1.26007351067009,      -1.26007351067011,
        2.00000000000000,      -7.34788079488412e-15, 1.26007351067010,
        1.26007351067010,      -5.99520433297585e-15, 1.17557050458494,
        -0.221231742082479,    0.221231742082483,     0.618033988749891,
        -2.33146835171283e-15, 1.00000000000000,      1.00000000000000,
        -9.54791801177635e-15, 1.90211303259031,      -1.39680224666743,
        1.39680224666741,      -1.61803398874990,     6.32827124036339e-15,
        -0.642039521920206,    -0.642039521920206,    0.00000000000000,
        5.88201851972683e-15,  -0.642039521920219,    0.642039521920207,
        -1.61803398874990,     -2.22044604925031e-14, -1.39680224666742,
        -1.39680224666742,     9.10382880192628e-15,  -1.90211303259031,
        1.00000000000000,      -0.999999999999985,    0.618033988749879,
        8.43769498715119e-15,  -0.221231742082474,    -0.221231742082475,
        5.55111512312578e-15,  -1.17557050458495,     1.26007351067012,
        -1.26007351067009,     2.00000000000000,      2.69546091939735e-14,
        1.26007351067013,      1.26007351067009,      1.55431223447522e-14,
        1.17557050458496,      -0.221231742082480,    0.221231742082484,
        0.618033988749890,     -2.77555756156289e-15, 1.00000000000000,
        1.00000000000000,      2.54241072639161e-14,  1.90211303259030,
        -1.39680224666741,     1.39680224666743,      -1.61803398874990,
        7.32747196252603e-15,  -0.642039521920206,    -0.642039521920206,
        0.00000000000000,      5.14723044023841e-15,  -0.642039521920193,
        0.642039521920205,     -1.61803398874989,     7.54951656745106e-15,
        -1.39680224666742,     -1.39680224666742,     7.93809462606987e-15,
        -1.90211303259031,     1.00000000000000,      -0.999999999999986,
        0.618033988749900,     -2.99760216648792e-15, -0.221231742082474,
        -0.221231742082474,    4.77395900588817e-15,  -1.17557050458495,
        1.26007351067011,      -1.26007351067009,     2.00000000000000,
        -9.79717439317883e-15, 1.26007351067010,      1.26007351067010,
        -4.55191440096314e-15, 1.17557050458494,      -0.221231742082469,
        0.221231742082465,     0.618033988749909,     7.88258347483861e-15,
        1.00000000000000,      0.999999999999999,     -7.27196081129478e-15,
        1.90211303259031,      -1.39680224666743,     1.39680224666741,
        -1.61803398874989,     -2.04281036531029e-14, -0.642039521920182,
        -0.642039521920204,    0.00000000000000,      4.41244236075000e-15,
        -0.642039521920217,    0.642039521920207,     -1.61803398874989,
        8.43769498715119e-15,  -1.39680224666742,     -1.39680224666742,
        -2.70339306496226e-14, -1.90211303259031,     0.999999999999996,
        -1.00000000000002,     0.618033988749901,     -3.33066907387547e-15,
        -0.221231742082474,    -0.221231742082473,    -1.68753899743024e-14,
        -1.17557050458493,     1.26007351067008,      -1.26007351067011,
        2.00000000000000,      -1.10218211923262e-14, 1.26007351067010,
        1.26007351067010,      -3.88578058618805e-15, 1.17557050458494,
        -0.221231742082481,    0.221231742082485,     0.618033988749889,
        -3.44169137633799e-15, 1.00000000000000,      0.999999999999998,
        -6.05071548420710e-15, 1.90211303259031,      -1.39680224666743,
        1.39680224666741,      -1.61803398874990,     9.32587340685132e-15,
        -0.642039521920208,    -0.642039521920206,    0.00000000000000,
        3.67765428126159e-15,  -0.642039521920217,    0.642039521920207,
        -1.61803398874990,     -1.93178806284777e-14, -1.39680224666742,
        -1.39680224666742,     5.60662627435704e-15,  -1.90211303259031,
        1.00000000000000,      -0.999999999999988,    0.618033988749881,
        7.32747196252603e-15,  -0.221231742082484,    -0.221231742082492,
        3.33066907387547e-15,  -1.17557050458495,     1.26007351067011,
        -1.26007351067009,     2.00000000000000,      2.32806687965315e-14,
        1.26007351067007,      1.26007351067012,      -3.21964677141295e-15,
        1.17557050458494,      -0.221231742082470,    0.221231742082467,
        0.618033988749867,     -1.47659662275146e-14, 1.00000000000001,
        0.999999999999969,     2.89213097914853e-14,  1.90211303259030,
        -1.39680224666741,     1.39680224666744,      -1.61803398874990,
        1.02140518265514e-14,  -0.642039521920209,    -0.642039521920206,
        0.00000000000000,      2.94286620177318e-15,  -0.642039521920216,
        0.642039521920207,     -1.61803398874990,     -1.83186799063151e-14,
        -1.39680224666745,     -1.39680224666739,     -2.93653990013354e-14,
        -1.90211303259031,     0.999999999999996,     -1.00000000000002,
        0.618033988749903,     -4.10782519111308e-15, -0.221231742082473,
        -0.221231742082472,    2.55351295663786e-15,  -1.17557050458495,
        1.26007351067011,      -1.26007351067010,     2.00000000000000,
        2.20560219973841e-14,  1.26007351067008,      1.26007351067011,
        -2.33146835171283e-14, 1.17557050458493,      -0.221231742082481,
        0.221231742082486,     0.618033988749887,     -4.21884749357560e-15,
        1.00000000000000,      0.999999999999996,     -3.71924713249427e-15,
        1.90211303259031,      -1.39680224666743,     1.39680224666741,
        -1.61803398874989,     -1.75415237890775e-14, -0.642039521920185,
        -0.642039521920204,    0.00000000000000,      2.35243601950878e-14,
        -0.642039521920240,    0.642039521920209,     -1.61803398874989,
        1.15463194561016e-14,  -1.39680224666742,     -1.39680224666742,
        3.27515792264421e-15,  -1.90211303259031,     1.00000000000000,
        -0.999999999999990,    0.618033988749923,     -1.54321000422897e-14,
        -0.221231742082462,    -0.221231742082452,    -1.89848137210902e-14,
        -1.17557050458493,     1.26007351067008,      -1.26007351067011,
        2.00000000000000,      -1.46957615897682e-14, 1.26007351067011,
        1.26007351067010,      -1.66533453693773e-15, 1.17557050458495,
        -0.221231742082471,    0.221231742082468,     0.618033988749907,
        6.32827124036339e-15,  0.999999999999994,     1.00000000000002,
        3.11972669919669e-14,  1.90211303259030,      -1.39680224666741,
        1.39680224666744,      -1.61803398874990,     1.23234755733392e-14,
        -0.642039521920211,    -0.642039521920207,    0.00000000000000,
        1.47329004279635e-15,  -0.642039521920214,    0.642039521920207,
        -1.61803398874990,     -1.62092561595273e-14, -1.39680224666740,
        -1.39680224666744,     3.59157148466238e-14,  -1.90211303259030,
        0.999999999999995,     -1.00000000000002,     0.618033988749904,
        -4.88498130835069e-15, -0.221231742082472,    -0.221231742082471,
        1.11022302462516e-15,  -1.17557050458495,     1.26007351067011,
        -1.26007351067010,     2.00000000000000,      1.96067283990894e-14,
        1.26007351067008,      1.26007351067011,      -2.18713935851156e-14,
        1.17557050458493,      -0.221231742082460,    0.221231742082450,
        0.618033988749926,     1.69864122767649e-14,  1.00000000000000,
        0.999999999999994,     -1.44328993201270e-15, 1.90211303259031,
        -1.39680224666743,     1.39680224666741,      -1.61803398874989,
        -1.54321000422897e-14, -0.642039521920187,    -0.642039521920205,
        0.00000000000000,      2.20547840361110e-14,  -0.642039521920238,
        0.642039521920209,     -1.61803398874991,     -4.39648317751562e-14,
        -1.39680224666738,     -1.39680224666747,     9.43689570931383e-16,
        -1.90211303259031,     1.00000000000000,      -0.999999999999992,
        0.618033988749884,     5.77315972805081e-15,  -0.221231742082483,
        -0.221231742082489,    2.13162820728030e-14,  -1.17557050458496,
        1.26007351067014,      -1.26007351067008,     2.00000000000000,
        5.39092183879471e-14,  1.26007351067005,      1.26007351067013,
        4.14113188185183e-14,  1.17557050458498,      -0.221231742082493,
        0.221231742082507,     0.618033988749865,     -1.63202784619898e-14,
        1.00000000000001,      0.999999999999965,     3.35287353436797e-14,
        1.90211303259030,      -1.39680224666740,     1.39680224666744,
        -1.61803398874990,     1.43218770176645e-14,  -0.642039521920212,
        -0.642039521920207,    0.00000000000000,      3.71388381953015e-18,
        -0.642039521920163,    0.642039521920203,     -1.61803398874988,
        4.31876756579186e-14,  -1.39680224666745,     -1.39680224666739,
        -3.40283357047611e-14, -1.90211303259031,     0.999999999999995,
        -1.00000000000002,     0.618033988749905,     -5.55111512312578e-15,
        -0.221231742082471,    -0.221231742082469,    -3.33066907387547e-16,
        -1.17557050458495,     1.26007351067011,      -1.26007351067010,
        2.00000000000000,      1.71574348007947e-14,  1.26007351067014,
        1.26007351067008,      2.13162820728030e-14,  1.17557050458496,
        -0.221231742082483,    0.221231742082489,     0.618033988749884,
        -5.77315972805081e-15, 1.00000000000000,      0.999999999999992,
        9.43689570931383e-16,  1.90211303259031,      -1.39680224666743,
        1.39680224666741,      -1.61803398874989,     -1.34336985979644e-14,
        -0.642039521920188,    -0.642039521920205,    0.00000000000000,
        2.05852078771341e-14,  -0.642039521920187,    0.642039521920205,
        -1.61803398874989,     1.54321000422897e-14,  -1.39680224666743,
        -1.39680224666741,     -1.44328993201270e-15, -1.90211303259031,
        1.00000000000000,      -0.999999999999994,    0.618033988749886,
        4.99600361081320e-15,  -0.221231742082482,    -0.221231742082488,
        1.99840144432528e-14,  -1.17557050458496,     1.26007351067014,
        -1.26007351067008,     2.00000000000000,      -1.95943487863577e-14,
        1.26007351067011,      1.26007351067010,      1.11022302462516e-15,
        1.17557050458495,      -0.221231742082472,    0.221231742082471,
        0.618033988749904,     4.88498130835069e-15,  0.999999999999995,
        1.00000000000002,      -3.16968673530482e-14, 1.90211303259031,
        -1.39680224666745,     1.39680224666739,      -1.61803398874988,
        -4.11892742135933e-14, -0.642039521920164,    -0.642039521920203,
        0.00000000000000,      -1.46586227515729e-15, -0.642039521920211,
        0.642039521920207,     -1.61803398874990,     -1.23234755733392e-14,
        -1.39680224666741,     -1.39680224666744,     3.12527781431982e-14,
        -1.90211303259030,     1.00000000000001,      -0.999999999999967,
        0.618033988749866,     1.56541446472147e-14,  -0.221231742082493,
        -0.221231742082506,    4.00790511889682e-14,  -1.17557050458498,
        1.26007351067011,      -1.26007351067010,     2.00000000000000,
        1.47081412025000e-14,  1.26007351067008,      1.26007351067011,
        -1.89848137210902e-14, 1.17557050458493,      -0.221231742082462,
        0.221231742082452,     0.618033988749883,     -6.43929354282591e-15,
        1.00000000000000,      0.999999999999990,     3.21964677141295e-15,
        1.90211303259031,      -1.39680224666738,     1.39680224666747,
        -1.61803398874991,     4.59632332194815e-14,  -0.642039521920240,
        -0.642039521920209,    0.00000000000000,      -2.35169324274487e-14,
        -0.642039521920185,    0.642039521920204,     -1.61803398874989,
        1.75415237890775e-14,  -1.39680224666743,     -1.39680224666741,
        -3.71924713249427e-15, -1.90211303259031,     1.00000000000000,
        -0.999999999999996,    0.618033988749928,     -1.76525460915400e-14,
        -0.221231742082459,    -0.221231742082449,    -2.33146835171283e-14,
        -1.17557050458493,     1.26007351067008,      -1.26007351067011,
        2.00000000000000,      -2.20436423846524e-14, 1.26007351067011,
        1.26007351067010,      2.55351295663786e-15,  1.17557050458495,
        -0.221231742082473,    0.221231742082472,     0.618033988749903,
        4.10782519111308e-15,  0.999999999999996,     1.00000000000002,
        3.81916720471054e-14,  1.90211303259030,      -1.39680224666740,
        1.39680224666744,      -1.61803398874990,     1.82076576038526e-14,
        -0.642039521920216,    -0.642039521920207,    0.00000000000000,
        -2.93543843413412e-15, -0.642039521920209,    0.642039521920206,
        -1.61803398874990,     -1.02140518265514e-14, -1.39680224666741,
        -1.39680224666744,     2.89213097914853e-14,  -1.90211303259030,
        0.999999999999994,     -1.00000000000003,     0.618033988749908,
        -7.10542735760100e-15, -0.221231742082470,    -0.221231742082467,
        -3.21964677141295e-15, -1.17557050458494,     1.26007351067010,
        -1.26007351067010,     2.00000000000000,      1.22588476042053e-14,
        1.26007351067008,      1.26007351067011,      -1.75415237890775e-14,
        1.17557050458493,      -0.221231742082462,    0.221231742082454,
        0.618033988749922,     1.46549439250521e-14,  1.00000000000000,
        0.999999999999988,     5.60662627435704e-15,  1.90211303259031,
        -1.39680224666742,     1.39680224666742,      -1.61803398874989,
        -9.43689570931383e-15, -0.642039521920192,    -0.642039521920205,
        0.00000000000000,      1.76460555591805e-14,  -0.642039521920233,
        0.642039521920208,     -1.61803398874991,     -3.79696274421804e-14,
        -1.39680224666739,     -1.39680224666746,     6.15063555642337e-14,
        -1.90211303259030,     1.00000000000000,      -0.999999999999998,
        0.618033988749889,     3.44169137633799e-15,  -0.221231742082481,
        -0.221231742082485,    1.69864122767649e-14,  -1.17557050458496,
        1.26007351067013,      -1.26007351067008,     2.00000000000000,
        4.65613375930630e-14,  1.26007351067006,      1.26007351067013,
        -3.77475828372553e-14, 1.17557050458492,      -0.221231742082452,
        0.221231742082436,     0.618033988749901,     3.33066907387547e-15,
        0.999999999999996,     1.00000000000002,      -2.70339306496226e-14,
        1.90211303259031,      -1.39680224666740,     1.39680224666745,
        -1.61803398874993,     7.77156117237610e-14,  -0.642039521920217,
        -0.642039521920207,    0.00000000000000,      -4.70375787387170e-14,
        -0.642039521920207,    0.642039521920206,     -1.61803398874987,
        4.91828799908944e-14,  -1.39680224666741,     -1.39680224666744,
        -4.09672296086683e-14, -1.90211303259032,     1.00000000000001,
        -0.999999999999971,    0.618033988749909,     -7.88258347483861e-15,
        -0.221231742082447,    -0.221231742082428,    -4.55191440096314e-15,
        -1.17557050458494,     1.26007351067004,      -1.26007351067013,
        2.00000000000000,      9.80955400591059e-15,  1.26007351067014,
        1.26007351067008,      -1.60982338570648e-14, 1.17557050458493,
        -0.221231742082485,    0.221231742082493,     0.618033988749921,
        1.38777878078145e-14,  1.00000000000000,      0.999999999999986,
        7.54396545232794e-14,  1.90211303259029,      -1.39680224666742,
        1.39680224666742,      -1.61803398874992,     4.99600361081320e-14,
        -0.642039521920193,    -0.642039521920205,    0.00000000000000,
        -2.64560847454024e-14, -0.642039521920231,    0.642039521920208,
        -1.61803398874989,     2.14273043752655e-14,  -1.39680224666739,
        -1.39680224666746,     -8.38218383591993e-15, -1.90211303259031,
        1.00000000000001,      -0.999999999999943,    0.618033988749890,
        2.77555756156289e-15,  -0.221231742082458,    -0.221231742082446,
        1.55431223447522e-14,  -1.17557050458496,     1.26007351067007,
        -1.26007351067012,     2.00000000000000,      4.41120439947683e-14,
        1.26007351067012,      1.26007351067009,      -3.63042929052426e-14,
        1.17557050458492,      -0.221231742082474,    0.221231742082475,
        0.618033988749940,     2.45359288442160e-14,  0.999999999999997,
        1.00000000000001,      4.28546087505310e-14,  1.90211303259030,
        -1.39680224666744,     1.39680224666739,      -1.61803398874990,
        2.22044604925031e-14,  -0.642039521920170,    -0.642039521920203,
        0.00000000000000,      -5.87459075208776e-15, -0.642039521920255,
        0.642039521920210,     -1.61803398874990,     -6.32827124036339e-15,
        -1.39680224666737,     -1.39680224666749,     2.42583730880597e-14,
        -1.90211303259030,     0.999999999999993,     -1.00000000000003,
        0.618033988749870,     1.33226762955019e-14,  -0.221231742082468,
        -0.221231742082464,    3.57491813929300e-14,  -1.17557050458498,
        1.26007351067010,      -1.26007351067010,     2.00000000000000,
        7.84145339836259e-14,  1.26007351067009,      1.26007351067011,
        -5.65103519534205e-14, 1.17557050458490,      -0.221231742082464,
        0.221231742082456,     0.618033988749879,     -8.77076189453874e-15,
        0.999999999999990,     1.00000000000004,      1.02140518265514e-14,
        1.90211303259031,      -1.39680224666746,     1.39680224666737,
        -1.61803398874989,     -5.55111512312578e-15, -0.642039521920245,
        -0.642039521920209,    0.00000000000000,      1.47069032412268e-14,
        -0.642039521920180,    0.642039521920204,     -1.61803398874986,
        8.09352584951739e-14,  -1.39680224666743,     -1.39680224666741,
        -7.83262343873048e-14, -1.90211303259032,     1.00000000000000,
        -1.00000000000000,     0.618033988749932,     -1.99840144432528e-14,
        -0.221231742082479,    -0.221231742082482,    -2.76445533131664e-14,
        -1.17557050458492,     1.26007351067013,      -1.26007351067009,
        2.00000000000000,      -2.93915231795365e-14, 1.26007351067018,
        1.26007351067006,      6.88338275267597e-15,  1.17557050458495,
        -0.221231742082497,    0.221231742082513,     0.618033988749898,
        1.88737914186277e-15,  1.00000000000001,      0.999999999999955,
        -2.23709939461969e-14, 1.90211303259031,      -1.39680224666740,
        1.39680224666745,      -1.61803398874988,     -3.33066907387547e-14,
        -0.642039521920221,    -0.642039521920207,    0.00000000000000,
        3.52883972345414e-14,  -0.642039521920204,    0.642039521920206,
        -1.61803398874987,     5.31796828795450e-14,  -1.39680224666741,
        -1.39680224666743,     -4.56856774633252e-14, -1.90211303259032,
        1.00000000000001,      -0.999999999999975,    0.618033988749912,
        -9.32587340685132e-15, -0.221231742082490,    -0.221231742082501,
        -7.54951656745106e-15, -1.17557050458494,     1.26007351067016,
        -1.26007351067007,     2.00000000000000,      4.91096680932118e-15,
        1.26007351067015,      1.26007351067008,      -1.32116539930394e-14,
        1.17557050458494,      -0.221231742082487,    0.221231742082495,
        0.618033988749918,     1.24344978758018e-14,  1.00000000000000,
        0.999999999999982,     -5.50115508701765e-14, 1.90211303259032,
        -1.39680224666742,     1.39680224666742,      -1.61803398874987,
        -6.10622663543836e-14, -0.642039521920197,    -0.642039521920205,
        0.00000000000000,      -2.93952370633560e-14, -0.642039521920228,
        0.642039521920208};
    q31_t cfft_testinput_q31_50hz_200Hz[1024] = {0},
          cfft_testinput_q31_50hz_200Hz_ref[1024] = {0};
    riscv_float_to_q31(cfft_testinput_f32_50hz_200Hz,
                     cfft_testinput_q31_50hz_200Hz, 1024);
    riscv_float_to_q31(cfft_testinput_f32_50hz_200Hz_ref,
                     cfft_testinput_q31_50hz_200Hz_ref, 1024);
    fftSize = 512;
    uint8_t ifftFlag = 0, doBitReverse = 1;
    BENCH_START(riscv_cfft_q31);
    riscv_cfft_q31(&riscv_cfft_sR_q31_len512, cfft_testinput_q31_50hz_200Hz,
                 ifftFlag, doBitReverse);
    BENCH_END(riscv_cfft_q31);
    ref_cfft_q31(&riscv_cfft_sR_q31_len512, cfft_testinput_q31_50hz_200Hz_ref,
                 ifftFlag, doBitReverse);
    riscv_q31_to_float(cfft_testinput_q31_50hz_200Hz,
                     cfft_testinput_f32_50hz_200Hz, 1024);
    q31_t resault, resault_ref;
    uint32_t index, index_ref;
    riscv_max_q31(cfft_testinput_q31_50hz_200Hz, 1024, &resault, &index);
    riscv_max_q31(cfft_testinput_q31_50hz_200Hz_ref, 1024, &resault_ref,
                &index_ref);
    if (index != index_ref) {
        BENCH_ERROR(riscv_cfft_q31);
        printf("expect: %d, actual: %d\n", index_ref, index);
        test_flag_error = 1;
    }
    BENCH_STATUS(riscv_cfft_q31);
}
static int DSP_cfft_q15(void)
{
    uint16_t i;
    float32_t cfft_testinput_f32_50hz_200Hz[1024] = {
        2.00000000000000,      0.00000000000000,      1.26007351067010,
        1.26007351067010,      1.11022302462516e-16,  1.17557050458495,
        -0.221231742082474,    0.221231742082474,     0.618033988749895,
        -1.11022302462516e-16, 1.00000000000000,      1.00000000000000,
        -7.21644966006352e-16, 1.90211303259031,      -1.39680224666742,
        1.39680224666742,      -1.61803398874990,     4.44089209850063e-16,
        -0.642039521920207,    -0.642039521920206,    0.00000000000000,
        -3.67394039744206e-16, -0.642039521920206,    0.642039521920206,
        -1.61803398874990,     -1.22124532708767e-15, -1.39680224666742,
        -1.39680224666742,     -7.77156117237610e-16, -1.90211303259031,
        1.00000000000000,      -1.00000000000000,     0.618033988749895,
        -3.33066907387547e-16, -0.221231742082475,    -0.221231742082476,
        -5.55111512312578e-16, -1.17557050458495,     1.26007351067010,
        -1.26007351067010,     2.00000000000000,      -1.22464679914735e-15,
        1.26007351067010,      1.26007351067010,      7.77156117237610e-16,
        1.17557050458495,      -0.221231742082475,    0.221231742082475,
        0.618033988749897,     8.88178419700125e-16,  0.999999999999999,
        1.00000000000000,      1.49880108324396e-15,  1.90211303259031,
        -1.39680224666742,     1.39680224666742,      -1.61803398874990,
        1.33226762955019e-15,  -0.642039521920207,    -0.642039521920206,
        0.00000000000000,      -1.10218211923262e-15, -0.642039521920205,
        0.642039521920206,     -1.61803398874989,     1.55431223447522e-15,
        -1.39680224666742,     -1.39680224666743,     6.49480469405717e-15,
        -1.90211303259031,     1.00000000000000,      -0.999999999999995,
        0.618033988749896,     -7.77156117237610e-16, -0.221231742082474,
        -0.221231742082473,    -1.44328993201270e-15, -1.17557050458495,
        1.26007351067010,      -1.26007351067010,     2.00000000000000,
        -2.44929359829471e-15, 1.26007351067010,      1.26007351067010,
        -3.77475828372553e-15, 1.17557050458494,      -0.221231742082475,
        0.221231742082476,     0.618033988749893,     -7.77156117237610e-16,
        1.00000000000000,      0.999999999999998,     2.66453525910038e-15,
        1.90211303259031,      -1.39680224666742,     1.39680224666742,
        -1.61803398874989,     -4.88498130835069e-15, -0.642039521920202,
        -0.642039521920206,    0.00000000000000,      3.49210031947972e-15,
        -0.642039521920198,    0.642039521920206,     -1.61803398874989,
        2.55351295663786e-15,  -1.39680224666742,     -1.39680224666742,
        -3.16413562018170e-15, -1.90211303259031,     1.00000000000000,
        -0.999999999999996,    0.618033988749897,     -9.99200722162641e-16,
        -0.221231742082476,    -0.221231742082477,    -2.10942374678780e-15,
        -1.17557050458494,     1.26007351067009,      -1.26007351067011,
        2.00000000000000,      -3.67394039744206e-15, 1.26007351067010,
        1.26007351067010,      2.22044604925031e-15,  1.17557050458495,
        -0.221231742082473,    0.221231742082472,     0.618033988749893,
        -1.22124532708767e-15, 0.999999999999999,     1.00000000000000,
        -1.31006316905768e-14, 1.90211303259031,      -1.39680224666742,
        1.39680224666742,      -1.61803398874989,     -1.09912079437891e-14,
        -0.642039521920203,    -0.642039521920206,    0.00000000000000,
        8.08638275819206e-15,  -0.642039521920197,    0.642039521920205,
        -1.61803398874989,     3.55271367880050e-15,  -1.39680224666743,
        -1.39680224666741,     -4.32986979603811e-15, -1.90211303259031,
        1.00000000000000,      -0.999999999999997,    0.618033988749898,
        -1.44328993201270e-15, -0.221231742082476,    -0.221231742082476,
        -2.77555756156289e-15, -1.17557050458494,     1.26007351067010,
        -1.26007351067010,     2.00000000000000,      -4.89858719658941e-15,
        1.26007351067010,      1.26007351067010,      -7.54951656745106e-15,
        1.17557050458494,      -0.221231742082473,    0.221231742082472,
        0.618033988749902,     3.88578058618805e-15,  0.999999999999999,
        1.00000000000000,      5.05151476204446e-15,  1.90211303259031,
        -1.39680224666741,     1.39680224666743,      -1.61803398874990,
        4.44089209850063e-15,  -0.642039521920216,    -0.642039521920207,
        0.00000000000000,      -3.30654635769785e-15, -0.642039521920209,
        0.642039521920206,     -1.61803398874989,     4.55191440096314e-15,
        -1.39680224666742,     -1.39680224666742,     -5.44009282066327e-15,
        -1.90211303259031,     1.00000000000000,      -0.999999999999998,
        0.618033988749888,     3.66373598126302e-15,  -0.221231742082475,
        -0.221231742082476,    6.88338275267597e-15,  -1.17557050458495,
        1.26007351067010,      -1.26007351067010,     2.00000000000000,
        1.16403343982657e-14,  1.26007351067010,      1.26007351067010,
        1.40998324127395e-14,  1.17557050458496,      -0.221231742082479,
        0.221231742082482,     0.618033988749891,     -1.99840144432528e-15,
        1.00000000000000,      1.00000000000000,      -1.07136521876328e-14,
        1.90211303259031,      -1.39680224666741,     1.39680224666743,
        -1.61803398874990,     5.44009282066327e-15,  -0.642039521920205,
        -0.642039521920206,    0.00000000000000,      6.61680659921524e-15,
        -0.642039521920220,    0.642039521920207,     -1.61803398874989,
        5.55111512312578e-15,  -1.39680224666742,     -1.39680224666742,
        1.02140518265514e-14,  -1.90211303259031,     1.00000000000000,
        -0.999999999999984,    0.618033988749899,     -2.10942374678780e-15,
        -0.221231742082475,    -0.221231742082475,    -1.47659662275146e-14,
        -1.17557050458493,     1.26007351067009,      -1.26007351067011,
        2.00000000000000,      -7.34788079488412e-15, 1.26007351067010,
        1.26007351067010,      -5.99520433297585e-15, 1.17557050458494,
        -0.221231742082479,    0.221231742082483,     0.618033988749891,
        -2.33146835171283e-15, 1.00000000000000,      1.00000000000000,
        -9.54791801177635e-15, 1.90211303259031,      -1.39680224666743,
        1.39680224666741,      -1.61803398874990,     6.32827124036339e-15,
        -0.642039521920206,    -0.642039521920206,    0.00000000000000,
        5.88201851972683e-15,  -0.642039521920219,    0.642039521920207,
        -1.61803398874990,     -2.22044604925031e-14, -1.39680224666742,
        -1.39680224666742,     9.10382880192628e-15,  -1.90211303259031,
        1.00000000000000,      -0.999999999999985,    0.618033988749879,
        8.43769498715119e-15,  -0.221231742082474,    -0.221231742082475,
        5.55111512312578e-15,  -1.17557050458495,     1.26007351067012,
        -1.26007351067009,     2.00000000000000,      2.69546091939735e-14,
        1.26007351067013,      1.26007351067009,      1.55431223447522e-14,
        1.17557050458496,      -0.221231742082480,    0.221231742082484,
        0.618033988749890,     -2.77555756156289e-15, 1.00000000000000,
        1.00000000000000,      2.54241072639161e-14,  1.90211303259030,
        -1.39680224666741,     1.39680224666743,      -1.61803398874990,
        7.32747196252603e-15,  -0.642039521920206,    -0.642039521920206,
        0.00000000000000,      5.14723044023841e-15,  -0.642039521920193,
        0.642039521920205,     -1.61803398874989,     7.54951656745106e-15,
        -1.39680224666742,     -1.39680224666742,     7.93809462606987e-15,
        -1.90211303259031,     1.00000000000000,      -0.999999999999986,
        0.618033988749900,     -2.99760216648792e-15, -0.221231742082474,
        -0.221231742082474,    4.77395900588817e-15,  -1.17557050458495,
        1.26007351067011,      -1.26007351067009,     2.00000000000000,
        -9.79717439317883e-15, 1.26007351067010,      1.26007351067010,
        -4.55191440096314e-15, 1.17557050458494,      -0.221231742082469,
        0.221231742082465,     0.618033988749909,     7.88258347483861e-15,
        1.00000000000000,      0.999999999999999,     -7.27196081129478e-15,
        1.90211303259031,      -1.39680224666743,     1.39680224666741,
        -1.61803398874989,     -2.04281036531029e-14, -0.642039521920182,
        -0.642039521920204,    0.00000000000000,      4.41244236075000e-15,
        -0.642039521920217,    0.642039521920207,     -1.61803398874989,
        8.43769498715119e-15,  -1.39680224666742,     -1.39680224666742,
        -2.70339306496226e-14, -1.90211303259031,     0.999999999999996,
        -1.00000000000002,     0.618033988749901,     -3.33066907387547e-15,
        -0.221231742082474,    -0.221231742082473,    -1.68753899743024e-14,
        -1.17557050458493,     1.26007351067008,      -1.26007351067011,
        2.00000000000000,      -1.10218211923262e-14, 1.26007351067010,
        1.26007351067010,      -3.88578058618805e-15, 1.17557050458494,
        -0.221231742082481,    0.221231742082485,     0.618033988749889,
        -3.44169137633799e-15, 1.00000000000000,      0.999999999999998,
        -6.05071548420710e-15, 1.90211303259031,      -1.39680224666743,
        1.39680224666741,      -1.61803398874990,     9.32587340685132e-15,
        -0.642039521920208,    -0.642039521920206,    0.00000000000000,
        3.67765428126159e-15,  -0.642039521920217,    0.642039521920207,
        -1.61803398874990,     -1.93178806284777e-14, -1.39680224666742,
        -1.39680224666742,     5.60662627435704e-15,  -1.90211303259031,
        1.00000000000000,      -0.999999999999988,    0.618033988749881,
        7.32747196252603e-15,  -0.221231742082484,    -0.221231742082492,
        3.33066907387547e-15,  -1.17557050458495,     1.26007351067011,
        -1.26007351067009,     2.00000000000000,      2.32806687965315e-14,
        1.26007351067007,      1.26007351067012,      -3.21964677141295e-15,
        1.17557050458494,      -0.221231742082470,    0.221231742082467,
        0.618033988749867,     -1.47659662275146e-14, 1.00000000000001,
        0.999999999999969,     2.89213097914853e-14,  1.90211303259030,
        -1.39680224666741,     1.39680224666744,      -1.61803398874990,
        1.02140518265514e-14,  -0.642039521920209,    -0.642039521920206,
        0.00000000000000,      2.94286620177318e-15,  -0.642039521920216,
        0.642039521920207,     -1.61803398874990,     -1.83186799063151e-14,
        -1.39680224666745,     -1.39680224666739,     -2.93653990013354e-14,
        -1.90211303259031,     0.999999999999996,     -1.00000000000002,
        0.618033988749903,     -4.10782519111308e-15, -0.221231742082473,
        -0.221231742082472,    2.55351295663786e-15,  -1.17557050458495,
        1.26007351067011,      -1.26007351067010,     2.00000000000000,
        2.20560219973841e-14,  1.26007351067008,      1.26007351067011,
        -2.33146835171283e-14, 1.17557050458493,      -0.221231742082481,
        0.221231742082486,     0.618033988749887,     -4.21884749357560e-15,
        1.00000000000000,      0.999999999999996,     -3.71924713249427e-15,
        1.90211303259031,      -1.39680224666743,     1.39680224666741,
        -1.61803398874989,     -1.75415237890775e-14, -0.642039521920185,
        -0.642039521920204,    0.00000000000000,      2.35243601950878e-14,
        -0.642039521920240,    0.642039521920209,     -1.61803398874989,
        1.15463194561016e-14,  -1.39680224666742,     -1.39680224666742,
        3.27515792264421e-15,  -1.90211303259031,     1.00000000000000,
        -0.999999999999990,    0.618033988749923,     -1.54321000422897e-14,
        -0.221231742082462,    -0.221231742082452,    -1.89848137210902e-14,
        -1.17557050458493,     1.26007351067008,      -1.26007351067011,
        2.00000000000000,      -1.46957615897682e-14, 1.26007351067011,
        1.26007351067010,      -1.66533453693773e-15, 1.17557050458495,
        -0.221231742082471,    0.221231742082468,     0.618033988749907,
        6.32827124036339e-15,  0.999999999999994,     1.00000000000002,
        3.11972669919669e-14,  1.90211303259030,      -1.39680224666741,
        1.39680224666744,      -1.61803398874990,     1.23234755733392e-14,
        -0.642039521920211,    -0.642039521920207,    0.00000000000000,
        1.47329004279635e-15,  -0.642039521920214,    0.642039521920207,
        -1.61803398874990,     -1.62092561595273e-14, -1.39680224666740,
        -1.39680224666744,     3.59157148466238e-14,  -1.90211303259030,
        0.999999999999995,     -1.00000000000002,     0.618033988749904,
        -4.88498130835069e-15, -0.221231742082472,    -0.221231742082471,
        1.11022302462516e-15,  -1.17557050458495,     1.26007351067011,
        -1.26007351067010,     2.00000000000000,      1.96067283990894e-14,
        1.26007351067008,      1.26007351067011,      -2.18713935851156e-14,
        1.17557050458493,      -0.221231742082460,    0.221231742082450,
        0.618033988749926,     1.69864122767649e-14,  1.00000000000000,
        0.999999999999994,     -1.44328993201270e-15, 1.90211303259031,
        -1.39680224666743,     1.39680224666741,      -1.61803398874989,
        -1.54321000422897e-14, -0.642039521920187,    -0.642039521920205,
        0.00000000000000,      2.20547840361110e-14,  -0.642039521920238,
        0.642039521920209,     -1.61803398874991,     -4.39648317751562e-14,
        -1.39680224666738,     -1.39680224666747,     9.43689570931383e-16,
        -1.90211303259031,     1.00000000000000,      -0.999999999999992,
        0.618033988749884,     5.77315972805081e-15,  -0.221231742082483,
        -0.221231742082489,    2.13162820728030e-14,  -1.17557050458496,
        1.26007351067014,      -1.26007351067008,     2.00000000000000,
        5.39092183879471e-14,  1.26007351067005,      1.26007351067013,
        4.14113188185183e-14,  1.17557050458498,      -0.221231742082493,
        0.221231742082507,     0.618033988749865,     -1.63202784619898e-14,
        1.00000000000001,      0.999999999999965,     3.35287353436797e-14,
        1.90211303259030,      -1.39680224666740,     1.39680224666744,
        -1.61803398874990,     1.43218770176645e-14,  -0.642039521920212,
        -0.642039521920207,    0.00000000000000,      3.71388381953015e-18,
        -0.642039521920163,    0.642039521920203,     -1.61803398874988,
        4.31876756579186e-14,  -1.39680224666745,     -1.39680224666739,
        -3.40283357047611e-14, -1.90211303259031,     0.999999999999995,
        -1.00000000000002,     0.618033988749905,     -5.55111512312578e-15,
        -0.221231742082471,    -0.221231742082469,    -3.33066907387547e-16,
        -1.17557050458495,     1.26007351067011,      -1.26007351067010,
        2.00000000000000,      1.71574348007947e-14,  1.26007351067014,
        1.26007351067008,      2.13162820728030e-14,  1.17557050458496,
        -0.221231742082483,    0.221231742082489,     0.618033988749884,
        -5.77315972805081e-15, 1.00000000000000,      0.999999999999992,
        9.43689570931383e-16,  1.90211303259031,      -1.39680224666743,
        1.39680224666741,      -1.61803398874989,     -1.34336985979644e-14,
        -0.642039521920188,    -0.642039521920205,    0.00000000000000,
        2.05852078771341e-14,  -0.642039521920187,    0.642039521920205,
        -1.61803398874989,     1.54321000422897e-14,  -1.39680224666743,
        -1.39680224666741,     -1.44328993201270e-15, -1.90211303259031,
        1.00000000000000,      -0.999999999999994,    0.618033988749886,
        4.99600361081320e-15,  -0.221231742082482,    -0.221231742082488,
        1.99840144432528e-14,  -1.17557050458496,     1.26007351067014,
        -1.26007351067008,     2.00000000000000,      -1.95943487863577e-14,
        1.26007351067011,      1.26007351067010,      1.11022302462516e-15,
        1.17557050458495,      -0.221231742082472,    0.221231742082471,
        0.618033988749904,     4.88498130835069e-15,  0.999999999999995,
        1.00000000000002,      -3.16968673530482e-14, 1.90211303259031,
        -1.39680224666745,     1.39680224666739,      -1.61803398874988,
        -4.11892742135933e-14, -0.642039521920164,    -0.642039521920203,
        0.00000000000000,      -1.46586227515729e-15, -0.642039521920211,
        0.642039521920207,     -1.61803398874990,     -1.23234755733392e-14,
        -1.39680224666741,     -1.39680224666744,     3.12527781431982e-14,
        -1.90211303259030,     1.00000000000001,      -0.999999999999967,
        0.618033988749866,     1.56541446472147e-14,  -0.221231742082493,
        -0.221231742082506,    4.00790511889682e-14,  -1.17557050458498,
        1.26007351067011,      -1.26007351067010,     2.00000000000000,
        1.47081412025000e-14,  1.26007351067008,      1.26007351067011,
        -1.89848137210902e-14, 1.17557050458493,      -0.221231742082462,
        0.221231742082452,     0.618033988749883,     -6.43929354282591e-15,
        1.00000000000000,      0.999999999999990,     3.21964677141295e-15,
        1.90211303259031,      -1.39680224666738,     1.39680224666747,
        -1.61803398874991,     4.59632332194815e-14,  -0.642039521920240,
        -0.642039521920209,    0.00000000000000,      -2.35169324274487e-14,
        -0.642039521920185,    0.642039521920204,     -1.61803398874989,
        1.75415237890775e-14,  -1.39680224666743,     -1.39680224666741,
        -3.71924713249427e-15, -1.90211303259031,     1.00000000000000,
        -0.999999999999996,    0.618033988749928,     -1.76525460915400e-14,
        -0.221231742082459,    -0.221231742082449,    -2.33146835171283e-14,
        -1.17557050458493,     1.26007351067008,      -1.26007351067011,
        2.00000000000000,      -2.20436423846524e-14, 1.26007351067011,
        1.26007351067010,      2.55351295663786e-15,  1.17557050458495,
        -0.221231742082473,    0.221231742082472,     0.618033988749903,
        4.10782519111308e-15,  0.999999999999996,     1.00000000000002,
        3.81916720471054e-14,  1.90211303259030,      -1.39680224666740,
        1.39680224666744,      -1.61803398874990,     1.82076576038526e-14,
        -0.642039521920216,    -0.642039521920207,    0.00000000000000,
        -2.93543843413412e-15, -0.642039521920209,    0.642039521920206,
        -1.61803398874990,     -1.02140518265514e-14, -1.39680224666741,
        -1.39680224666744,     2.89213097914853e-14,  -1.90211303259030,
        0.999999999999994,     -1.00000000000003,     0.618033988749908,
        -7.10542735760100e-15, -0.221231742082470,    -0.221231742082467,
        -3.21964677141295e-15, -1.17557050458494,     1.26007351067010,
        -1.26007351067010,     2.00000000000000,      1.22588476042053e-14,
        1.26007351067008,      1.26007351067011,      -1.75415237890775e-14,
        1.17557050458493,      -0.221231742082462,    0.221231742082454,
        0.618033988749922,     1.46549439250521e-14,  1.00000000000000,
        0.999999999999988,     5.60662627435704e-15,  1.90211303259031,
        -1.39680224666742,     1.39680224666742,      -1.61803398874989,
        -9.43689570931383e-15, -0.642039521920192,    -0.642039521920205,
        0.00000000000000,      1.76460555591805e-14,  -0.642039521920233,
        0.642039521920208,     -1.61803398874991,     -3.79696274421804e-14,
        -1.39680224666739,     -1.39680224666746,     6.15063555642337e-14,
        -1.90211303259030,     1.00000000000000,      -0.999999999999998,
        0.618033988749889,     3.44169137633799e-15,  -0.221231742082481,
        -0.221231742082485,    1.69864122767649e-14,  -1.17557050458496,
        1.26007351067013,      -1.26007351067008,     2.00000000000000,
        4.65613375930630e-14,  1.26007351067006,      1.26007351067013,
        -3.77475828372553e-14, 1.17557050458492,      -0.221231742082452,
        0.221231742082436,     0.618033988749901,     3.33066907387547e-15,
        0.999999999999996,     1.00000000000002,      -2.70339306496226e-14,
        1.90211303259031,      -1.39680224666740,     1.39680224666745,
        -1.61803398874993,     7.77156117237610e-14,  -0.642039521920217,
        -0.642039521920207,    0.00000000000000,      -4.70375787387170e-14,
        -0.642039521920207,    0.642039521920206,     -1.61803398874987,
        4.91828799908944e-14,  -1.39680224666741,     -1.39680224666744,
        -4.09672296086683e-14, -1.90211303259032,     1.00000000000001,
        -0.999999999999971,    0.618033988749909,     -7.88258347483861e-15,
        -0.221231742082447,    -0.221231742082428,    -4.55191440096314e-15,
        -1.17557050458494,     1.26007351067004,      -1.26007351067013,
        2.00000000000000,      9.80955400591059e-15,  1.26007351067014,
        1.26007351067008,      -1.60982338570648e-14, 1.17557050458493,
        -0.221231742082485,    0.221231742082493,     0.618033988749921,
        1.38777878078145e-14,  1.00000000000000,      0.999999999999986,
        7.54396545232794e-14,  1.90211303259029,      -1.39680224666742,
        1.39680224666742,      -1.61803398874992,     4.99600361081320e-14,
        -0.642039521920193,    -0.642039521920205,    0.00000000000000,
        -2.64560847454024e-14, -0.642039521920231,    0.642039521920208,
        -1.61803398874989,     2.14273043752655e-14,  -1.39680224666739,
        -1.39680224666746,     -8.38218383591993e-15, -1.90211303259031,
        1.00000000000001,      -0.999999999999943,    0.618033988749890,
        2.77555756156289e-15,  -0.221231742082458,    -0.221231742082446,
        1.55431223447522e-14,  -1.17557050458496,     1.26007351067007,
        -1.26007351067012,     2.00000000000000,      4.41120439947683e-14,
        1.26007351067012,      1.26007351067009,      -3.63042929052426e-14,
        1.17557050458492,      -0.221231742082474,    0.221231742082475,
        0.618033988749940,     2.45359288442160e-14,  0.999999999999997,
        1.00000000000001,      4.28546087505310e-14,  1.90211303259030,
        -1.39680224666744,     1.39680224666739,      -1.61803398874990,
        2.22044604925031e-14,  -0.642039521920170,    -0.642039521920203,
        0.00000000000000,      -5.87459075208776e-15, -0.642039521920255,
        0.642039521920210,     -1.61803398874990,     -6.32827124036339e-15,
        -1.39680224666737,     -1.39680224666749,     2.42583730880597e-14,
        -1.90211303259030,     0.999999999999993,     -1.00000000000003,
        0.618033988749870,     1.33226762955019e-14,  -0.221231742082468,
        -0.221231742082464,    3.57491813929300e-14,  -1.17557050458498,
        1.26007351067010,      -1.26007351067010,     2.00000000000000,
        7.84145339836259e-14,  1.26007351067009,      1.26007351067011,
        -5.65103519534205e-14, 1.17557050458490,      -0.221231742082464,
        0.221231742082456,     0.618033988749879,     -8.77076189453874e-15,
        0.999999999999990,     1.00000000000004,      1.02140518265514e-14,
        1.90211303259031,      -1.39680224666746,     1.39680224666737,
        -1.61803398874989,     -5.55111512312578e-15, -0.642039521920245,
        -0.642039521920209,    0.00000000000000,      1.47069032412268e-14,
        -0.642039521920180,    0.642039521920204,     -1.61803398874986,
        8.09352584951739e-14,  -1.39680224666743,     -1.39680224666741,
        -7.83262343873048e-14, -1.90211303259032,     1.00000000000000,
        -1.00000000000000,     0.618033988749932,     -1.99840144432528e-14,
        -0.221231742082479,    -0.221231742082482,    -2.76445533131664e-14,
        -1.17557050458492,     1.26007351067013,      -1.26007351067009,
        2.00000000000000,      -2.93915231795365e-14, 1.26007351067018,
        1.26007351067006,      6.88338275267597e-15,  1.17557050458495,
        -0.221231742082497,    0.221231742082513,     0.618033988749898,
        1.88737914186277e-15,  1.00000000000001,      0.999999999999955,
        -2.23709939461969e-14, 1.90211303259031,      -1.39680224666740,
        1.39680224666745,      -1.61803398874988,     -3.33066907387547e-14,
        -0.642039521920221,    -0.642039521920207,    0.00000000000000,
        3.52883972345414e-14,  -0.642039521920204,    0.642039521920206,
        -1.61803398874987,     5.31796828795450e-14,  -1.39680224666741,
        -1.39680224666743,     -4.56856774633252e-14, -1.90211303259032,
        1.00000000000001,      -0.999999999999975,    0.618033988749912,
        -9.32587340685132e-15, -0.221231742082490,    -0.221231742082501,
        -7.54951656745106e-15, -1.17557050458494,     1.26007351067016,
        -1.26007351067007,     2.00000000000000,      4.91096680932118e-15,
        1.26007351067015,      1.26007351067008,      -1.32116539930394e-14,
        1.17557050458494,      -0.221231742082487,    0.221231742082495,
        0.618033988749918,     1.24344978758018e-14,  1.00000000000000,
        0.999999999999982,     -5.50115508701765e-14, 1.90211303259032,
        -1.39680224666742,     1.39680224666742,      -1.61803398874987,
        -6.10622663543836e-14, -0.642039521920197,    -0.642039521920205,
        0.00000000000000,      -2.93952370633560e-14, -0.642039521920228,
        0.642039521920208};
    q15_t cfft_testinput_q15_50hz_200Hz_ref[1024] = {
        816,   328,   -22,   338,    -24,  350,   -28,   364,    -32,   380,
        -36,   394,   -42,   412,    -48,  430,   -52,   454,    -60,   478,
        -68,   504,   -78,   534,    -88,  570,   -100,  610,    -116,  656,
        -134,  712,   -154,  780,    -180, 862,   -214,  966,    -256,  1102,
        -316,  1284,  -402,  1546,   -532, 1958,  -766,  2678,   -1292, 4302,
        -3578, 11336, 5562,  -16792, 1646, -4738, 994,   -2726,  726,   -1898,
        580,   -1444, 488,   -1160,  426,  -962,  378,   -818,   344,   -708,
        316,   -622,  294,   -550,   276,  -492,  262,   -444,   248,   -402,
        238,   -364,  228,   -334,   218,  -304,  212,   -278,   206,   -256,
        200,   -236,  194,   -218,   190,  -202,  184,   -186,   176,   -174,
        162,   -166,  48,    -234,   214,  -102,  192,   -102,   184,   -96,
        182,   -86,   178,   -74,    178,  -66,   176,   -58,    174,   -48,
        172,   -38,   172,   -28,    172,  -20,   170,   -10,    172,   0,
        170,   6,     172,   14,     172,  26,    174,   34,     172,   42,
        174,   52,    176,   60,     180,  68,    182,   82,     186,   90,
        192,   96,    214,   96,     46,   232,   162,   162,    176,   170,
        182,   182,   190,   196,    192,  212,   200,   230,    206,   252,
        212,   274,   218,   300,    228,  328,   238,   360,    248,   396,
        260,   438,   276,   488,    294,  546,   318,   618,    344,   702,
        380,   812,   426,   956,    488,  1154,  580,   1440,   726,   1892,
        994,   2722,  1648,  4730,   5564, 16786, -3576, -11344, -1292, -4308,
        -764,  -2684, -530,  -1962,  -398, -1554, -314,  -1290,  -254,  -1106,
        -212,  -972,  -178,  -868,   -152, -784,  -132,  -716,   -116,  -662,
        -100,  -616,  -88,   -576,   -76,  -540,  -66,   -510,   -58,   -484,
        -52,   -460,  -44,   -440,   -40,  -420,  -34,   -402,   -32,   -386,
        -26,   -372,  -22,   -360,   -18,  -346,  820,   -332,   -10,   -324,
        -8,    -314,  -4,    -306,   -2,   -298,  0,     -290,   2,     -282,
        2,     -276,  4,     -270,   6,    -264,  8,     -258,   8,     -256,
        10,    -250,  12,    -246,   12,   -240,  14,    -238,   14,    -236,
        16,    -234,  18,    -232,   18,   -228,  20,    -228,   20,    -230,
        22,    -234,  28,    -242,   36,   -266,  74,    -380,   -78,   86,
        -14,   -110,  -2,    -140,   2,    -154,  4,     -158,   4,     -162,
        4,     -164,  4,     -164,   4,    -166,  2,     -166,   0,     -168,
        -2,    -168,  -4,    -170,   -8,   -172,  -12,   -174,   -16,   -176,
        -22,   -178,  -30,   -182,   -38,  -190,  -54,   -198,   -70,   -210,
        -98,   -230,  -144,  -260,   -228, -322,  -460,  -490,   -3002, -2334,
        812,   436,   388,   128,    268,  42,    210,   4,      178,   -22,
        156,   -36,   142,   -46,    130,  -52,   122,   -58,    116,   -62,
        110,   -66,   106,   -70,    102,  -70,   102,   -74,    98,    -76,
        96,    -76,   96,    -76,    92,   -78,   92,    -78,    92,    -80,
        94,    -82,   94,    -84,    100,  -88,   110,   -98,    150,   -126,
        -206,  132,   32,    -40,    50,   -54,   58,    -60,    62,    -64,
        64,    -64,   66,    -64,    66,   -66,   66,    -66,    66,    -66,
        68,    -66,   68,    -66,    68,   -66,   68,    -66,    68,    -66,
        66,    -64,   70,    -64,    70,   -64,   68,    -62,    70,    -64,
        70,    -62,   70,    -60,    72,   -58,   72,    -52,    76,    -42,
        98,    28,    48,    -132,   62,   -92,   64,    -84,    66,    -78,
        66,    -76,   66,    -74,    68,   -74,   66,    -74,    68,    -74,
        66,    -72,   68,    -74,    68,   -72,   68,    -72,    68,    -72,
        68,    -74,   68,    -72,    70,   -74,   70,    -74,    70,    -74,
        70,    -76,   70,    -74,    70,   -74,   72,    -76,    72,    -76,
        72,    -78,   12,    -76,    74,   -80,   74,    -82,    76,    -84,
        76,    -82,   76,    -86,    78,   -88,   78,    -90,    78,    -92,
        80,    -96,   82,    -100,   82,   -104,  84,    -108,   86,    -114,
        88,    -120,  92,    -126,   94,   -138,  98,    -150,   102,   -164,
        110,   -184,  118,   -212,   132,  -252,  152,   -312,   186,   -422,
        266,   -666,  612,   -1726,  -768, 2518,  -176,  700,    -78,   398,
        -36,   272,   -14,   206,    0,    162,   8,     134,    14,    112,
        22,    98,    24,    84,     28,   76,    32,    68,     34,    60,
        36,    54,    40,    52,     40,   46,    42,    42,     44,    42,
        48,    40,    50,    36,     52,   36,    58,    38,     64,    40,
        76,    46,    106,   68,     444,  310,   -60,   -60,    -6,    -20,
        10,    -8,    18,    -4,     24,   -2,    26,    0,      28,    0,
        30,    0,     30,    0,      30,   0,     30,    0,      32,    0,
        32,    0,     32,    -2,     32,   -2,    30,    -2,     32,    0,
        30,    0,     28,    -2,     26,   -2,    24,    0,      20,    4,
        12,    6,     -6,    18,     -62,  58,    442,   -310,   106,   -68,
        76,    -46,   64,    -42,    56,   -38,   52,    -38,    48,    -40,
        48,    -40,   44,    -42,    42,   -44,   40,    -48,    40,    -52,
        36,    -56,   34,    -62,    32,   -66,   28,    -76,    26,    -86,
        20,    -98,   14,    -116,   8,    -134,  -2,    -164,   -14,   -208,
        -38,   -274,  -78,   -398,   -178, -700,  -768,  -2520,  612,   1722,
        266,   664,   188,   420,    152,  312,   130,   250,    120,   212,
        112,   184,   104,   164,    98,   148,   94,    136,    90,    128,
        88,    120,   86,    114,    84,   106,   82,    104,    80,    98,
        78,    96,    78,    92,     78,   88,    76,    88,     76,    86,
        74,    84,    74,    82,     72,   80,    72,    80,     8,     80,
        72,    76,    72,    76,     72,   74,    72,    74,     72,    74,
        70,    74,    70,    74,     70,   72,    68,    72,     68,    72,
        70,    72,    68,    70,     68,   72,    68,    72,     68,    72,
        68,    72,    68,    72,     68,   72,    68,    74,     68,    74,
        66,    76,    64,    78,     64,   82,    60,    92,     48,    130,
        100,   -28,   76,    40,     74,   52,    72,    56,     70,    60,
        70,    62,    68,    62,     70,   64,    70,    64,     72,    66,
        70,    66,    70,    64,     68,   66,    68,    64,     68,    64,
        68,    64,    68,    66,     66,   66,    66,    64,     66,    64,
        64,    64,    62,    62,     58,   60,    52,    54,     30,    38,
        -206,  -134,  150,   122,    110,  94,    100,   88,     96,    84,
        94,    80,    94,    80,     92,   78,    94,    76,     96,    76,
        96,    76,    98,    72,     100,  72,    102,   70,     106,   68,
        110,   64,    116,   62,     122,  58,    130,   52,     142,   44,
        158,   34,    178,   18,     212,  -2,    268,   -42,    388,   -132,
        812,   -438,  -3000, 2332,   -458, 488,   -230,  322,    -142,  258,
        -96,   226,   -70,   208,    -52,  196,   -38,   188,    -30,   182,
        -22,   178,   -16,   174,    -12,  172,   -8,    170,    -4,    168,
        -2,    166,   0,     166,    2,    164,   2,     164,    4,     164,
        4,     162,   4,     160,    2,    158,   2,     150,    -4,    140,
        -14,   108,   -76,   -88,    74,   380,   38,    266,    28,    240,
        24,    232,   22,    228,    20,   228,   18,    228,    18,    230,
        16,    230,   14,    234,    16,   236,   14,    240,    10,    242,
        10,    248,   8,     252,    8,    258,   6,     262,    6,     268,
        2,     276,   2,     280,    -2,   288,   -4,    296,    -6,    304,
        -8,    314,   -10,   324};
    q15_t cfft_testinput_q15_50hz_200Hz[1024] = {0};
    riscv_float_to_q15(cfft_testinput_f32_50hz_200Hz,
                     cfft_testinput_q15_50hz_200Hz, 1024);
    riscv_float_to_q15(cfft_testinput_f32_50hz_200Hz,
                     cfft_testinput_q15_50hz_200Hz_ref, 1024);
    fftSize = 512;
    uint8_t ifftFlag = 0, doBitReverse = 1;
    BENCH_START(riscv_cfft_q15);
    riscv_cfft_q15(&riscv_cfft_sR_q15_len512, cfft_testinput_q15_50hz_200Hz,
                 ifftFlag, doBitReverse);
    BENCH_END(riscv_cfft_q15);
    ref_cfft_q15(&riscv_cfft_sR_q15_len512, cfft_testinput_q15_50hz_200Hz_ref,
                 ifftFlag, doBitReverse);
    q15_t resault, resault_ref;
    uint32_t index, index_ref;
    riscv_max_q15(cfft_testinput_q15_50hz_200Hz, 1024, &resault, &index);
    riscv_max_q15(cfft_testinput_q15_50hz_200Hz_ref, 1024, &resault_ref,
                &index_ref);
    if (index != index_ref) {
        BENCH_ERROR(riscv_cfft_q15);
        printf("expect: %d, actual: %d\n", index_ref, index);
        test_flag_error = 1;
    }
    BENCH_STATUS(riscv_cfft_q15);
}

int main()
{
    BENCH_INIT;
    DSP_cfft_f32();
    DSP_cfft_q31();
    DSP_cfft_q15();
    BENCH_FINISH;
    if (test_flag_error) {
        printf("test error apprears, please recheck.\n");
        return 1;
    } else {
        printf("all test are passed. Well done!\n");
    }
    return 0;
}
