#include <math.h>
#include "zhang_definitivo.h"
#ifndef struct_dsp_ZeroCrossingDetector_0
#define struct_dsp_ZeroCrossingDetector_0

struct dsp_ZeroCrossingDetector_0
{
  int S0_isInitialized;
  double W0_InputBuffer;
};

#endif

#ifndef typedef_dsp_ZeroCrossingDetector_0
#define typedef_dsp_ZeroCrossingDetector_0

typedef struct dsp_ZeroCrossingDetector_0 dsp_ZeroCrossingDetector_0;

#endif

#ifndef typedef_dspcodegen_ZeroCrossingDetector
#define typedef_dspcodegen_ZeroCrossingDetector

typedef struct {
  boolean_T matlabCodegenIsDeleted;
  long isInitialized;
  boolean_T isSetupComplete;
  dsp_ZeroCrossingDetector_0 cSFunObject;
} dspcodegen_ZeroCrossingDetector;

#endif

static unsigned long SystemCore_step(dspcodegen_ZeroCrossingDetector *obj);
static boolean_T any(boolean_T x);
static void b_abs(const creal_T x[158], double y[158]);
static boolean_T b_any(double x);
static void b_power(const double a[4], double y[4]);
static void b_r2br_r2dit_trig(const creal_T x[1024], const double costab[513],
  const double sintab[513], creal_T y[1024]);
static void b_sqrt(double *x);
static double b_sum(const double x[4]);
static void c_abs(const creal_T x[4], double y[4]);
static void c_matlabCodegenHandle_matlabCod(dspcodegen_ZeroCrossingDetector *obj);
static void fft(const double x[320], creal_T y[320]);
static void power(const double a[158], double y[158]);
static void r2br_r2dit_trig(const creal_T x[639], const double costab[513],
  const double sintab[513], creal_T y[1024]);
static void r2br_r2dit_trig_impl(const creal_T x[320], const double costab[513],
  const double sintab[513], creal_T y[1024]);
static double rt_hypotd(double u0, double u1);
static double sum(const double x[158]);
static unsigned long SystemCore_step(dspcodegen_ZeroCrossingDetector *obj)
{
  if (obj->isInitialized != 1L) {
    obj->isSetupComplete = false;
    obj->isInitialized = 1L;
    obj->isSetupComplete = true;
    obj->cSFunObject.W0_InputBuffer = 0.0;
  }

  return 0UL;
}

static boolean_T any(boolean_T x)
{
  return x;
}

static void b_abs(const creal_T x[158], double y[158])
{
  int k;
  for (k = 0; k < 158; k++) {
    y[k] = rt_hypotd(x[k].re, x[k].im);
  }
}

static boolean_T b_any(double x)
{
  return !(x == 0.0);
}

static void b_power(const double a[4], double y[4])
{
  int k;
  for (k = 0; k < 4; k++) {
    y[k] = a[k] * a[k];
  }
}

static void b_r2br_r2dit_trig(const creal_T x[1024], const double costab[513],
  const double sintab[513], creal_T y[1024])
{
  int ix;
  int ju;
  int iy;
  int i;
  boolean_T tst;
  double temp_re;
  double temp_im;
  int iheight;
  int istart;
  int j;
  double twid_re;
  double twid_im;
  int ihi;
  ix = 0;
  ju = 0;
  iy = 0;
  for (i = 0; i < 1023; i++) {
    y[iy] = x[ix];
    iy = 1024;
    tst = true;
    while (tst) {
      iy >>= 1;
      ju ^= iy;
      tst = ((ju & iy) == 0);
    }

    iy = ju;
    ix++;
  }

  y[iy] = x[ix];
  for (i = 0; i <= 1023; i += 2) {
    temp_re = y[i + 1].re;
    temp_im = y[i + 1].im;
    y[i + 1].re = y[i].re - y[i + 1].re;
    y[i + 1].im = y[i].im - y[i + 1].im;
    y[i].re += temp_re;
    y[i].im += temp_im;
  }

  iy = 2;
  ix = 4;
  ju = 256;
  iheight = 1021;
  while (ju > 0) {
    for (i = 0; i < iheight; i += ix) {
      temp_re = y[i + iy].re;
      temp_im = y[i + iy].im;
      y[i + iy].re = y[i].re - temp_re;
      y[i + iy].im = y[i].im - temp_im;
      y[i].re += temp_re;
      y[i].im += temp_im;
    }

    istart = 1;
    for (j = ju; j < 512; j += ju) {
      twid_re = costab[j];
      twid_im = sintab[j];
      i = istart;
      ihi = istart + iheight;
      while (i < ihi) {
        temp_re = twid_re * y[i + iy].re - twid_im * y[i + iy].im;
        temp_im = twid_re * y[i + iy].im + twid_im * y[i + iy].re;
        y[i + iy].re = y[i].re - temp_re;
        y[i + iy].im = y[i].im - temp_im;
        y[i].re += temp_re;
        y[i].im += temp_im;
        i += ix;
      }

      istart++;
    }

    ju /= 2;
    iy = ix;
    ix += ix;
    iheight -= iy;
  }

  for (iy = 0; iy < 1024; iy++) {
    y[iy].re *= 0.0009765625;
    y[iy].im *= 0.0009765625;
  }
}

static void b_sqrt(double *x)
{
  *x = sqrt(*x);
}

static double b_sum(const double x[4])
{
  double y;
  int k;
  y = x[0];
  for (k = 0; k < 3; k++) {
    y += x[k + 1];
  }

  return y;
}

static void c_abs(const creal_T x[4], double y[4])
{
  int k;
  for (k = 0; k < 4; k++) {
    y[k] = rt_hypotd(x[k].re, x[k].im);
  }
}

static void c_matlabCodegenHandle_matlabCod(dspcodegen_ZeroCrossingDetector *obj)
{
  if (!obj->matlabCodegenIsDeleted) {
    obj->matlabCodegenIsDeleted = true;
    if (obj->isInitialized == 1L) {
      obj->isInitialized = 2L;
    }
  }
}

static void fft(const double x[320], creal_T y[320])
{
  int xidx;
  int k;
  static const double costab[513] = { 1.0, 0.99998117528260111,
    0.9999247018391445, 0.9998305817958234, 0.99969881869620425,
    0.99952941750109314, 0.99932238458834954, 0.99907772775264536,
    0.99879545620517241, 0.99847558057329477, 0.99811811290014918,
    0.99772306664419164, 0.99729045667869021, 0.99682029929116567,
    0.996312612182778, 0.99576741446765982, 0.99518472667219693,
    0.99456457073425542, 0.99390697000235606, 0.9932119492347945,
    0.99247953459871, 0.99170975366909953, 0.99090263542778, 0.99005821026229712,
    0.989176509964781, 0.98825756773074946, 0.98730141815785843,
    0.98630809724459867, 0.98527764238894122, 0.984210092386929,
    0.98310548743121629, 0.98196386910955524, 0.98078528040323043,
    0.97956976568544052, 0.97831737071962765, 0.97702814265775439,
    0.97570213003852857, 0.97433938278557586, 0.97293995220556018,
    0.97150389098625178, 0.970031253194544, 0.96852209427441727,
    0.96697647104485207, 0.9653944416976894, 0.96377606579543984,
    0.96212140426904158, 0.96043051941556579, 0.9587034748958716,
    0.95694033573220882, 0.95514116830577078, 0.95330604035419386,
    0.95143502096900834, 0.94952818059303667, 0.94758559101774109,
    0.94560732538052128, 0.94359345816196039, 0.94154406518302081,
    0.93945922360218992, 0.937339011912575, 0.93518350993894761,
    0.932992798834739, 0.93076696107898371, 0.92850608047321559,
    0.92621024213831138, 0.92387953251128674, 0.9215140393420419,
    0.91911385169005777, 0.9166790599210427, 0.91420975570353069,
    0.91170603200542988, 0.90916798309052238, 0.90659570451491533,
    0.90398929312344334, 0.901348847046022, 0.89867446569395382,
    0.89596624975618522, 0.89322430119551532, 0.89044872324475788,
    0.88763962040285393, 0.88479709843093779, 0.881921264348355,
    0.87901222642863353, 0.8760700941954066, 0.87309497841829009,
    0.87008699110871146, 0.86704624551569265, 0.8639728561215867,
    0.86086693863776731, 0.85772861000027212, 0.85455798836540053,
    0.8513551931052652, 0.84812034480329723, 0.84485356524970712,
    0.84155497743689844, 0.83822470555483808, 0.83486287498638,
    0.83146961230254524, 0.8280450452577558, 0.82458930278502529,
    0.82110251499110465, 0.81758481315158371, 0.81403632970594841,
    0.81045719825259477, 0.80684755354379933, 0.80320753148064494,
    0.799537269107905, 0.79583690460888357, 0.79210657730021239,
    0.78834642762660634, 0.78455659715557524, 0.78073722857209449,
    0.77688846567323244, 0.773010453362737, 0.7691033376455797,
    0.765167265622459, 0.76120238548426178, 0.75720884650648457,
    0.75318679904361252, 0.74913639452345937, 0.745057785441466,
    0.74095112535495922, 0.73681656887736979, 0.73265427167241282,
    0.7284643904482252, 0.724247082951467, 0.72000250796138165,
    0.71573082528381859, 0.71143219574521643, 0.70710678118654757,
    0.7027547444572253, 0.69837624940897292, 0.69397146088965389,
    0.68954054473706683, 0.68508366777270036, 0.680600997795453,
    0.67609270357531592, 0.67155895484701833, 0.66699992230363747,
    0.66241577759017178, 0.65780669329707864, 0.65317284295377676,
    0.64851440102211244, 0.64383154288979139, 0.63912444486377573,
    0.63439328416364549, 0.629638238914927, 0.62485948814238634,
    0.6200572117632891, 0.61523159058062682, 0.61038280627630948,
    0.60551104140432555, 0.600616479383869, 0.59569930449243336,
    0.59075970185887416, 0.58579785745643886, 0.58081395809576453,
    0.57580819141784534, 0.57078074588696726, 0.56573181078361312,
    0.560661576197336, 0.55557023301960218, 0.55045797293660481,
    0.54532498842204646, 0.54017147272989285, 0.53499761988709715,
    0.52980362468629461, 0.524589682678469, 0.51935599016558964,
    0.51410274419322166, 0.508830142543107, 0.50353838372571758,
    0.49822766697278181, 0.49289819222978404, 0.487550160148436,
    0.48218377207912272, 0.47679923006332209, 0.47139673682599764,
    0.46597649576796618, 0.46053871095824, 0.45508358712634384,
    0.44961132965460654, 0.4441221445704292, 0.43861623853852766,
    0.43309381885315196, 0.42755509343028208, 0.42200027079979968,
    0.41642956009763715, 0.41084317105790391, 0.40524131400498986,
    0.39962419984564679, 0.3939920400610481, 0.38834504669882625,
    0.38268343236508978, 0.37700741021641826, 0.37131719395183749,
    0.36561299780477385, 0.35989503653498811, 0.35416352542049034,
    0.34841868024943456, 0.34266071731199438, 0.33688985339222005,
    0.33110630575987643, 0.32531029216226293, 0.31950203081601569,
    0.31368174039889152, 0.30784964004153487, 0.30200594931922808,
    0.29615088824362379, 0.29028467725446233, 0.28440753721127188,
    0.27851968938505306, 0.272621355449949, 0.26671275747489837,
    0.26079411791527551, 0.25486565960451457, 0.24892760574572015,
    0.24298017990326387, 0.2370236059943672, 0.23105810828067111,
    0.22508391135979283, 0.2191012401568698, 0.21311031991609136,
    0.20711137619221856, 0.2011046348420919, 0.19509032201612825,
    0.18906866414980619, 0.18303988795514095, 0.17700422041214875,
    0.17096188876030122, 0.16491312048996992, 0.15885814333386145,
    0.15279718525844344, 0.14673047445536175, 0.14065823933284921,
    0.13458070850712617, 0.12849811079379317, 0.1224106751992162,
    0.11631863091190475, 0.11022220729388306, 0.10412163387205459,
    0.0980171403295606, 0.091908956497132724, 0.0857973123444399,
    0.079682437971430126, 0.073564563599667426, 0.067443919563664051,
    0.061320736302208578, 0.055195244349689941, 0.049067674327418015,
    0.04293825693494082, 0.036807222941358832, 0.030674803176636626,
    0.024541228522912288, 0.01840672990580482, 0.012271538285719925,
    0.0061358846491544753, 0.0, -0.0061358846491544753, -0.012271538285719925,
    -0.01840672990580482, -0.024541228522912288, -0.030674803176636626,
    -0.036807222941358832, -0.04293825693494082, -0.049067674327418015,
    -0.055195244349689941, -0.061320736302208578, -0.067443919563664051,
    -0.073564563599667426, -0.079682437971430126, -0.0857973123444399,
    -0.091908956497132724, -0.0980171403295606, -0.10412163387205459,
    -0.11022220729388306, -0.11631863091190475, -0.1224106751992162,
    -0.12849811079379317, -0.13458070850712617, -0.14065823933284921,
    -0.14673047445536175, -0.15279718525844344, -0.15885814333386145,
    -0.16491312048996992, -0.17096188876030122, -0.17700422041214875,
    -0.18303988795514095, -0.18906866414980619, -0.19509032201612825,
    -0.2011046348420919, -0.20711137619221856, -0.21311031991609136,
    -0.2191012401568698, -0.22508391135979283, -0.23105810828067111,
    -0.2370236059943672, -0.24298017990326387, -0.24892760574572015,
    -0.25486565960451457, -0.26079411791527551, -0.26671275747489837,
    -0.272621355449949, -0.27851968938505306, -0.28440753721127188,
    -0.29028467725446233, -0.29615088824362379, -0.30200594931922808,
    -0.30784964004153487, -0.31368174039889152, -0.31950203081601569,
    -0.32531029216226293, -0.33110630575987643, -0.33688985339222005,
    -0.34266071731199438, -0.34841868024943456, -0.35416352542049034,
    -0.35989503653498811, -0.36561299780477385, -0.37131719395183749,
    -0.37700741021641826, -0.38268343236508978, -0.38834504669882625,
    -0.3939920400610481, -0.39962419984564679, -0.40524131400498986,
    -0.41084317105790391, -0.41642956009763715, -0.42200027079979968,
    -0.42755509343028208, -0.43309381885315196, -0.43861623853852766,
    -0.4441221445704292, -0.44961132965460654, -0.45508358712634384,
    -0.46053871095824, -0.46597649576796618, -0.47139673682599764,
    -0.47679923006332209, -0.48218377207912272, -0.487550160148436,
    -0.49289819222978404, -0.49822766697278181, -0.50353838372571758,
    -0.508830142543107, -0.51410274419322166, -0.51935599016558964,
    -0.524589682678469, -0.52980362468629461, -0.53499761988709715,
    -0.54017147272989285, -0.54532498842204646, -0.55045797293660481,
    -0.55557023301960218, -0.560661576197336, -0.56573181078361312,
    -0.57078074588696726, -0.57580819141784534, -0.58081395809576453,
    -0.58579785745643886, -0.59075970185887416, -0.59569930449243336,
    -0.600616479383869, -0.60551104140432555, -0.61038280627630948,
    -0.61523159058062682, -0.6200572117632891, -0.62485948814238634,
    -0.629638238914927, -0.63439328416364549, -0.63912444486377573,
    -0.64383154288979139, -0.64851440102211244, -0.65317284295377676,
    -0.65780669329707864, -0.66241577759017178, -0.66699992230363747,
    -0.67155895484701833, -0.67609270357531592, -0.680600997795453,
    -0.68508366777270036, -0.68954054473706683, -0.69397146088965389,
    -0.69837624940897292, -0.7027547444572253, -0.70710678118654757,
    -0.71143219574521643, -0.71573082528381859, -0.72000250796138165,
    -0.724247082951467, -0.7284643904482252, -0.73265427167241282,
    -0.73681656887736979, -0.74095112535495922, -0.745057785441466,
    -0.74913639452345937, -0.75318679904361252, -0.75720884650648457,
    -0.76120238548426178, -0.765167265622459, -0.7691033376455797,
    -0.773010453362737, -0.77688846567323244, -0.78073722857209449,
    -0.78455659715557524, -0.78834642762660634, -0.79210657730021239,
    -0.79583690460888357, -0.799537269107905, -0.80320753148064494,
    -0.80684755354379933, -0.81045719825259477, -0.81403632970594841,
    -0.81758481315158371, -0.82110251499110465, -0.82458930278502529,
    -0.8280450452577558, -0.83146961230254524, -0.83486287498638,
    -0.83822470555483808, -0.84155497743689844, -0.84485356524970712,
    -0.84812034480329723, -0.8513551931052652, -0.85455798836540053,
    -0.85772861000027212, -0.86086693863776731, -0.8639728561215867,
    -0.86704624551569265, -0.87008699110871146, -0.87309497841829009,
    -0.8760700941954066, -0.87901222642863353, -0.881921264348355,
    -0.88479709843093779, -0.88763962040285393, -0.89044872324475788,
    -0.89322430119551532, -0.89596624975618522, -0.89867446569395382,
    -0.901348847046022, -0.90398929312344334, -0.90659570451491533,
    -0.90916798309052238, -0.91170603200542988, -0.91420975570353069,
    -0.9166790599210427, -0.91911385169005777, -0.9215140393420419,
    -0.92387953251128674, -0.92621024213831138, -0.92850608047321559,
    -0.93076696107898371, -0.932992798834739, -0.93518350993894761,
    -0.937339011912575, -0.93945922360218992, -0.94154406518302081,
    -0.94359345816196039, -0.94560732538052128, -0.94758559101774109,
    -0.94952818059303667, -0.95143502096900834, -0.95330604035419386,
    -0.95514116830577078, -0.95694033573220882, -0.9587034748958716,
    -0.96043051941556579, -0.96212140426904158, -0.96377606579543984,
    -0.9653944416976894, -0.96697647104485207, -0.96852209427441727,
    -0.970031253194544, -0.97150389098625178, -0.97293995220556018,
    -0.97433938278557586, -0.97570213003852857, -0.97702814265775439,
    -0.97831737071962765, -0.97956976568544052, -0.98078528040323043,
    -0.98196386910955524, -0.98310548743121629, -0.984210092386929,
    -0.98527764238894122, -0.98630809724459867, -0.98730141815785843,
    -0.98825756773074946, -0.989176509964781, -0.99005821026229712,
    -0.99090263542778, -0.99170975366909953, -0.99247953459871,
    -0.9932119492347945, -0.99390697000235606, -0.99456457073425542,
    -0.99518472667219693, -0.99576741446765982, -0.996312612182778,
    -0.99682029929116567, -0.99729045667869021, -0.99772306664419164,
    -0.99811811290014918, -0.99847558057329477, -0.99879545620517241,
    -0.99907772775264536, -0.99932238458834954, -0.99952941750109314,
    -0.99969881869620425, -0.9998305817958234, -0.9999247018391445,
    -0.99998117528260111, -1.0 };

  static const double sintab[513] = { 0.0, -0.0061358846491544753,
    -0.012271538285719925, -0.01840672990580482, -0.024541228522912288,
    -0.030674803176636626, -0.036807222941358832, -0.04293825693494082,
    -0.049067674327418015, -0.055195244349689941, -0.061320736302208578,
    -0.067443919563664051, -0.073564563599667426, -0.079682437971430126,
    -0.0857973123444399, -0.091908956497132724, -0.0980171403295606,
    -0.10412163387205459, -0.11022220729388306, -0.11631863091190475,
    -0.1224106751992162, -0.12849811079379317, -0.13458070850712617,
    -0.14065823933284921, -0.14673047445536175, -0.15279718525844344,
    -0.15885814333386145, -0.16491312048996992, -0.17096188876030122,
    -0.17700422041214875, -0.18303988795514095, -0.18906866414980619,
    -0.19509032201612825, -0.2011046348420919, -0.20711137619221856,
    -0.21311031991609136, -0.2191012401568698, -0.22508391135979283,
    -0.23105810828067111, -0.2370236059943672, -0.24298017990326387,
    -0.24892760574572015, -0.25486565960451457, -0.26079411791527551,
    -0.26671275747489837, -0.272621355449949, -0.27851968938505306,
    -0.28440753721127188, -0.29028467725446233, -0.29615088824362379,
    -0.30200594931922808, -0.30784964004153487, -0.31368174039889152,
    -0.31950203081601569, -0.32531029216226293, -0.33110630575987643,
    -0.33688985339222005, -0.34266071731199438, -0.34841868024943456,
    -0.35416352542049034, -0.35989503653498811, -0.36561299780477385,
    -0.37131719395183749, -0.37700741021641826, -0.38268343236508978,
    -0.38834504669882625, -0.3939920400610481, -0.39962419984564679,
    -0.40524131400498986, -0.41084317105790391, -0.41642956009763715,
    -0.42200027079979968, -0.42755509343028208, -0.43309381885315196,
    -0.43861623853852766, -0.4441221445704292, -0.44961132965460654,
    -0.45508358712634384, -0.46053871095824, -0.46597649576796618,
    -0.47139673682599764, -0.47679923006332209, -0.48218377207912272,
    -0.487550160148436, -0.49289819222978404, -0.49822766697278181,
    -0.50353838372571758, -0.508830142543107, -0.51410274419322166,
    -0.51935599016558964, -0.524589682678469, -0.52980362468629461,
    -0.53499761988709715, -0.54017147272989285, -0.54532498842204646,
    -0.55045797293660481, -0.55557023301960218, -0.560661576197336,
    -0.56573181078361312, -0.57078074588696726, -0.57580819141784534,
    -0.58081395809576453, -0.58579785745643886, -0.59075970185887416,
    -0.59569930449243336, -0.600616479383869, -0.60551104140432555,
    -0.61038280627630948, -0.61523159058062682, -0.6200572117632891,
    -0.62485948814238634, -0.629638238914927, -0.63439328416364549,
    -0.63912444486377573, -0.64383154288979139, -0.64851440102211244,
    -0.65317284295377676, -0.65780669329707864, -0.66241577759017178,
    -0.66699992230363747, -0.67155895484701833, -0.67609270357531592,
    -0.680600997795453, -0.68508366777270036, -0.68954054473706683,
    -0.69397146088965389, -0.69837624940897292, -0.7027547444572253,
    -0.70710678118654757, -0.71143219574521643, -0.71573082528381859,
    -0.72000250796138165, -0.724247082951467, -0.7284643904482252,
    -0.73265427167241282, -0.73681656887736979, -0.74095112535495922,
    -0.745057785441466, -0.74913639452345937, -0.75318679904361252,
    -0.75720884650648457, -0.76120238548426178, -0.765167265622459,
    -0.7691033376455797, -0.773010453362737, -0.77688846567323244,
    -0.78073722857209449, -0.78455659715557524, -0.78834642762660634,
    -0.79210657730021239, -0.79583690460888357, -0.799537269107905,
    -0.80320753148064494, -0.80684755354379933, -0.81045719825259477,
    -0.81403632970594841, -0.81758481315158371, -0.82110251499110465,
    -0.82458930278502529, -0.8280450452577558, -0.83146961230254524,
    -0.83486287498638, -0.83822470555483808, -0.84155497743689844,
    -0.84485356524970712, -0.84812034480329723, -0.8513551931052652,
    -0.85455798836540053, -0.85772861000027212, -0.86086693863776731,
    -0.8639728561215867, -0.86704624551569265, -0.87008699110871146,
    -0.87309497841829009, -0.8760700941954066, -0.87901222642863353,
    -0.881921264348355, -0.88479709843093779, -0.88763962040285393,
    -0.89044872324475788, -0.89322430119551532, -0.89596624975618522,
    -0.89867446569395382, -0.901348847046022, -0.90398929312344334,
    -0.90659570451491533, -0.90916798309052238, -0.91170603200542988,
    -0.91420975570353069, -0.9166790599210427, -0.91911385169005777,
    -0.9215140393420419, -0.92387953251128674, -0.92621024213831138,
    -0.92850608047321559, -0.93076696107898371, -0.932992798834739,
    -0.93518350993894761, -0.937339011912575, -0.93945922360218992,
    -0.94154406518302081, -0.94359345816196039, -0.94560732538052128,
    -0.94758559101774109, -0.94952818059303667, -0.95143502096900834,
    -0.95330604035419386, -0.95514116830577078, -0.95694033573220882,
    -0.9587034748958716, -0.96043051941556579, -0.96212140426904158,
    -0.96377606579543984, -0.9653944416976894, -0.96697647104485207,
    -0.96852209427441727, -0.970031253194544, -0.97150389098625178,
    -0.97293995220556018, -0.97433938278557586, -0.97570213003852857,
    -0.97702814265775439, -0.97831737071962765, -0.97956976568544052,
    -0.98078528040323043, -0.98196386910955524, -0.98310548743121629,
    -0.984210092386929, -0.98527764238894122, -0.98630809724459867,
    -0.98730141815785843, -0.98825756773074946, -0.989176509964781,
    -0.99005821026229712, -0.99090263542778, -0.99170975366909953,
    -0.99247953459871, -0.9932119492347945, -0.99390697000235606,
    -0.99456457073425542, -0.99518472667219693, -0.99576741446765982,
    -0.996312612182778, -0.99682029929116567, -0.99729045667869021,
    -0.99772306664419164, -0.99811811290014918, -0.99847558057329477,
    -0.99879545620517241, -0.99907772775264536, -0.99932238458834954,
    -0.99952941750109314, -0.99969881869620425, -0.9998305817958234,
    -0.9999247018391445, -0.99998117528260111, -1.0, -0.99998117528260111,
    -0.9999247018391445, -0.9998305817958234, -0.99969881869620425,
    -0.99952941750109314, -0.99932238458834954, -0.99907772775264536,
    -0.99879545620517241, -0.99847558057329477, -0.99811811290014918,
    -0.99772306664419164, -0.99729045667869021, -0.99682029929116567,
    -0.996312612182778, -0.99576741446765982, -0.99518472667219693,
    -0.99456457073425542, -0.99390697000235606, -0.9932119492347945,
    -0.99247953459871, -0.99170975366909953, -0.99090263542778,
    -0.99005821026229712, -0.989176509964781, -0.98825756773074946,
    -0.98730141815785843, -0.98630809724459867, -0.98527764238894122,
    -0.984210092386929, -0.98310548743121629, -0.98196386910955524,
    -0.98078528040323043, -0.97956976568544052, -0.97831737071962765,
    -0.97702814265775439, -0.97570213003852857, -0.97433938278557586,
    -0.97293995220556018, -0.97150389098625178, -0.970031253194544,
    -0.96852209427441727, -0.96697647104485207, -0.9653944416976894,
    -0.96377606579543984, -0.96212140426904158, -0.96043051941556579,
    -0.9587034748958716, -0.95694033573220882, -0.95514116830577078,
    -0.95330604035419386, -0.95143502096900834, -0.94952818059303667,
    -0.94758559101774109, -0.94560732538052128, -0.94359345816196039,
    -0.94154406518302081, -0.93945922360218992, -0.937339011912575,
    -0.93518350993894761, -0.932992798834739, -0.93076696107898371,
    -0.92850608047321559, -0.92621024213831138, -0.92387953251128674,
    -0.9215140393420419, -0.91911385169005777, -0.9166790599210427,
    -0.91420975570353069, -0.91170603200542988, -0.90916798309052238,
    -0.90659570451491533, -0.90398929312344334, -0.901348847046022,
    -0.89867446569395382, -0.89596624975618522, -0.89322430119551532,
    -0.89044872324475788, -0.88763962040285393, -0.88479709843093779,
    -0.881921264348355, -0.87901222642863353, -0.8760700941954066,
    -0.87309497841829009, -0.87008699110871146, -0.86704624551569265,
    -0.8639728561215867, -0.86086693863776731, -0.85772861000027212,
    -0.85455798836540053, -0.8513551931052652, -0.84812034480329723,
    -0.84485356524970712, -0.84155497743689844, -0.83822470555483808,
    -0.83486287498638, -0.83146961230254524, -0.8280450452577558,
    -0.82458930278502529, -0.82110251499110465, -0.81758481315158371,
    -0.81403632970594841, -0.81045719825259477, -0.80684755354379933,
    -0.80320753148064494, -0.799537269107905, -0.79583690460888357,
    -0.79210657730021239, -0.78834642762660634, -0.78455659715557524,
    -0.78073722857209449, -0.77688846567323244, -0.773010453362737,
    -0.7691033376455797, -0.765167265622459, -0.76120238548426178,
    -0.75720884650648457, -0.75318679904361252, -0.74913639452345937,
    -0.745057785441466, -0.74095112535495922, -0.73681656887736979,
    -0.73265427167241282, -0.7284643904482252, -0.724247082951467,
    -0.72000250796138165, -0.71573082528381859, -0.71143219574521643,
    -0.70710678118654757, -0.7027547444572253, -0.69837624940897292,
    -0.69397146088965389, -0.68954054473706683, -0.68508366777270036,
    -0.680600997795453, -0.67609270357531592, -0.67155895484701833,
    -0.66699992230363747, -0.66241577759017178, -0.65780669329707864,
    -0.65317284295377676, -0.64851440102211244, -0.64383154288979139,
    -0.63912444486377573, -0.63439328416364549, -0.629638238914927,
    -0.62485948814238634, -0.6200572117632891, -0.61523159058062682,
    -0.61038280627630948, -0.60551104140432555, -0.600616479383869,
    -0.59569930449243336, -0.59075970185887416, -0.58579785745643886,
    -0.58081395809576453, -0.57580819141784534, -0.57078074588696726,
    -0.56573181078361312, -0.560661576197336, -0.55557023301960218,
    -0.55045797293660481, -0.54532498842204646, -0.54017147272989285,
    -0.53499761988709715, -0.52980362468629461, -0.524589682678469,
    -0.51935599016558964, -0.51410274419322166, -0.508830142543107,
    -0.50353838372571758, -0.49822766697278181, -0.49289819222978404,
    -0.487550160148436, -0.48218377207912272, -0.47679923006332209,
    -0.47139673682599764, -0.46597649576796618, -0.46053871095824,
    -0.45508358712634384, -0.44961132965460654, -0.4441221445704292,
    -0.43861623853852766, -0.43309381885315196, -0.42755509343028208,
    -0.42200027079979968, -0.41642956009763715, -0.41084317105790391,
    -0.40524131400498986, -0.39962419984564679, -0.3939920400610481,
    -0.38834504669882625, -0.38268343236508978, -0.37700741021641826,
    -0.37131719395183749, -0.36561299780477385, -0.35989503653498811,
    -0.35416352542049034, -0.34841868024943456, -0.34266071731199438,
    -0.33688985339222005, -0.33110630575987643, -0.32531029216226293,
    -0.31950203081601569, -0.31368174039889152, -0.30784964004153487,
    -0.30200594931922808, -0.29615088824362379, -0.29028467725446233,
    -0.28440753721127188, -0.27851968938505306, -0.272621355449949,
    -0.26671275747489837, -0.26079411791527551, -0.25486565960451457,
    -0.24892760574572015, -0.24298017990326387, -0.2370236059943672,
    -0.23105810828067111, -0.22508391135979283, -0.2191012401568698,
    -0.21311031991609136, -0.20711137619221856, -0.2011046348420919,
    -0.19509032201612825, -0.18906866414980619, -0.18303988795514095,
    -0.17700422041214875, -0.17096188876030122, -0.16491312048996992,
    -0.15885814333386145, -0.15279718525844344, -0.14673047445536175,
    -0.14065823933284921, -0.13458070850712617, -0.12849811079379317,
    -0.1224106751992162, -0.11631863091190475, -0.11022220729388306,
    -0.10412163387205459, -0.0980171403295606, -0.091908956497132724,
    -0.0857973123444399, -0.079682437971430126, -0.073564563599667426,
    -0.067443919563664051, -0.061320736302208578, -0.055195244349689941,
    -0.049067674327418015, -0.04293825693494082, -0.036807222941358832,
    -0.030674803176636626, -0.024541228522912288, -0.01840672990580482,
    -0.012271538285719925, -0.0061358846491544753, -0.0 };

  static creal_T fv[1024];
  static const creal_T wwc[639] = { { 0.999951808959328, 0.009817319337149617 },
    { 0.9992290362407229, 0.03925981575906861 }, { 0.99609903325168714,
      0.088242370520369512 }, { 0.98768834059513777, 0.15643446504023087 }, {
      0.970031253194544, 0.24298017990326387 }, { 0.93819133592248416,
      0.34611705707749296 }, { 0.88650661594474645, 0.46271591704435 }, {
      0.80901699437494745, 0.58778525229247314 }, { 0.70013081189852366,
      0.71401459805126821 }, { 0.55557023301960229, 0.83146961230254524 }, {
      0.37359497005251635, 0.927591935255724 }, { 0.15643446504023092,
      0.98768834059513777 }, { -0.0882423705203695, 0.99609903325168714 }, { -
      0.34611705707749268, 0.93819133592248427 }, { -0.59569930449243336,
      0.80320753148064494 }, { -0.80901699437494734, 0.58778525229247325 }, { -
      0.95404440240628041, 0.29966527699625667 }, { -0.9992290362407229,
      -0.039259815759068263 }, { -0.92007808433459515, -0.3917350108519555 }, {
      -0.70710678118654768, -0.70710678118654746 }, { -0.37359497005251646,
      -0.927591935255724 }, { 0.039259815759068645, -0.9992290362407229 }, {
      0.46271591704434956, -0.88650661594474667 }, { 0.80901699437494734,
      -0.58778525229247336 }, { 0.989176509964781, -0.1467304744553615 }, {
      0.93819133592248416, 0.34611705707749296 }, { 0.64195160256270312,
      0.7667451597285615 }, { 0.15643446504023092, 0.98768834059513777 }, { -
      0.39173501085195594, 0.92007808433459493 }, { -0.831469612302545,
      0.55557023301960251 }, { -0.999951808959328, -0.009817319337149551 }, { -
      0.80901699437494745, -0.587785252292473 }, { -0.29966527699625628,
      -0.95404440240628052 }, { 0.346117057077493, -0.93819133592248416 }, {
      0.857728610000272, -0.51410274419322188 }, { 0.98768834059513777,
      0.15643446504023087 }, { 0.64195160256270312, 0.7667451597285615 }, { -
      0.039259815759068326, 0.9992290362407229 }, { -0.71401459805126821,
      0.70013081189852366 }, { -1.0, 1.2246467991473532E-16 }, { -
      0.700130811898524, -0.71401459805126788 }, { 0.039259815759068645,
      -0.9992290362407229 }, { 0.76674515972856139, -0.64195160256270323 }, {
      0.98768834059513777, 0.15643446504023087 }, { 0.51410274419322166,
      0.85772861000027212 }, { -0.34611705707749268, 0.93819133592248427 }, { -
      0.95404440240628041, 0.29966527699625667 }, { -0.80901699437494745,
      -0.587785252292473 }, { 0.0098173193371490445, -0.999951808959328 }, {
      0.83146961230254524, -0.55557023301960218 }, { 0.92007808433459493,
      0.39173501085195589 }, { 0.15643446504023092, 0.98768834059513777 }, { -
      0.7667451597285615, 0.64195160256270312 }, { -0.938191335922484,
      -0.34611705707749307 }, { -0.1467304744553623, -0.9891765099647809 }, {
      0.80901699437494734, -0.58778525229247336 }, { 0.88650661594474645,
      0.46271591704435 }, { -0.039259815759068326, 0.9992290362407229 }, { -
      0.927591935255724, 0.37359497005251641 }, { -0.70710678118654768,
      -0.70710678118654746 }, { 0.39173501085195583, -0.92007808433459493 }, {
      0.9992290362407229, 0.03925981575906861 }, { 0.29966527699625661,
      0.95404440240628041 }, { -0.80901699437494734, 0.58778525229247325 }, { -
      0.80320753148064472, -0.59569930449243358 }, { 0.346117057077493,
      -0.93819133592248416 }, { 0.99609903325168714, 0.088242370520369512 }, {
      0.15643446504023092, 0.98768834059513777 }, { -0.927591935255724,
      0.37359497005251641 }, { -0.55557023301960218, -0.83146961230254524 }, {
      0.71401459805126843, -0.70013081189852344 }, { 0.80901699437494745,
      0.58778525229247314 }, { -0.46271591704435006, 0.88650661594474645 }, { -
      0.938191335922484, -0.34611705707749307 }, { 0.24298017990326376,
      -0.970031253194544 }, { 0.98768834059513777, 0.15643446504023087 }, { -
      0.0882423705203695, 0.99609903325168714 }, { -0.9992290362407229,
      -0.039259815759068263 }, { 0.0098173193371490445, -0.999951808959328 }, {
      1.0, -0.0 }, { -0.0098173193371496117, 0.999951808959328 }, { -
      0.9992290362407229, -0.039259815759068263 }, { 0.088242370520369387,
      -0.99609903325168725 }, { 0.98768834059513777, 0.15643446504023087 }, { -
      0.24298017990326365, 0.97003125319454409 }, { -0.938191335922484,
      -0.34611705707749307 }, { 0.46271591704434956, -0.88650661594474667 }, {
      0.80901699437494745, 0.58778525229247314 }, { -0.71401459805126821,
      0.70013081189852366 }, { -0.55557023301960218, -0.83146961230254524 }, {
      0.927591935255724, -0.37359497005251652 }, { 0.15643446504023092,
      0.98768834059513777 }, { -0.99609903325168725, -0.088242370520369443 }, {
      0.346117057077493, -0.93819133592248416 }, { 0.80320753148064494,
      0.59569930449243325 }, { -0.80901699437494734, 0.58778525229247325 }, { -
      0.29966527699625628, -0.95404440240628052 }, { 0.9992290362407229,
      0.03925981575906861 }, { -0.39173501085195594, 0.92007808433459493 }, { -
      0.70710678118654768, -0.70710678118654746 }, { 0.927591935255724,
      -0.37359497005251652 }, { -0.039259815759068326, 0.9992290362407229 }, { -
      0.88650661594474645, -0.46271591704435 }, { 0.80901699437494734,
      -0.58778525229247336 }, { 0.14673047445536175, 0.989176509964781 }, { -
      0.938191335922484, -0.34611705707749307 }, { 0.76674515972856139,
      -0.64195160256270323 }, { 0.15643446504023092, 0.98768834059513777 }, { -
      0.92007808433459515, -0.3917350108519555 }, { 0.83146961230254524,
      -0.55557023301960218 }, { -0.0098173193371496117, 0.999951808959328 }, { -
      0.80901699437494745, -0.587785252292473 }, { 0.9540444024062803,
      -0.29966527699625722 }, { -0.34611705707749268, 0.93819133592248427 }, { -
      0.51410274419322177, -0.857728610000272 }, { 0.98768834059513777,
      0.15643446504023087 }, { -0.7667451597285615, 0.64195160256270312 }, {
      0.039259815759068645, -0.9992290362407229 }, { 0.70013081189852366,
      0.71401459805126821 }, { -1.0, 1.2246467991473532E-16 }, {
      0.71401459805126843, -0.70013081189852344 }, { -0.039259815759068326,
      0.9992290362407229 }, { -0.64195160256270323, -0.76674515972856139 }, {
      0.98768834059513777, 0.15643446504023087 }, { -0.857728610000272,
      0.51410274419322177 }, { 0.346117057077493, -0.93819133592248416 }, {
      0.29966527699625661, 0.95404440240628041 }, { -0.80901699437494745,
      -0.587785252292473 }, { 0.999951808959328, 0.009817319337149617 }, { -
      0.831469612302545, 0.55557023301960251 }, { 0.39173501085195583,
      -0.92007808433459493 }, { 0.15643446504023092, 0.98768834059513777 }, { -
      0.64195160256270323, -0.76674515972856139 }, { 0.93819133592248416,
      0.34611705707749296 }, { -0.989176509964781, 0.1467304744553618 }, {
      0.80901699437494734, -0.58778525229247336 }, { -0.46271591704435006,
      0.88650661594474645 }, { 0.039259815759068645, -0.9992290362407229 }, {
      0.37359497005251635, 0.927591935255724 }, { -0.70710678118654768,
      -0.70710678118654746 }, { 0.92007808433459493, 0.39173501085195589 }, { -
      0.9992290362407229, -0.039259815759068263 }, { 0.9540444024062803,
      -0.29966527699625722 }, { -0.80901699437494734, 0.58778525229247325 }, {
      0.5956993044924328, -0.80320753148064528 }, { -0.34611705707749268,
      0.93819133592248427 }, { 0.088242370520369387, -0.99609903325168725 }, {
      0.15643446504023092, 0.98768834059513777 }, { -0.37359497005251646,
      -0.927591935255724 }, { 0.55557023301960229, 0.83146961230254524 }, { -
      0.700130811898524, -0.71401459805126788 }, { 0.80901699437494745,
      0.58778525229247314 }, { -0.88650661594474645, -0.46271591704435 }, {
      0.93819133592248416, 0.34611705707749296 }, { -0.970031253194544,
      -0.24298017990326382 }, { 0.98768834059513777, 0.15643446504023087 }, { -
      0.99609903325168725, -0.088242370520369443 }, { 0.9992290362407229,
      0.03925981575906861 }, { -0.999951808959328, -0.009817319337149551 }, {
      1.0, -0.0 }, { -0.999951808959328, -0.009817319337149551 }, {
      0.9992290362407229, 0.03925981575906861 }, { -0.99609903325168725,
      -0.088242370520369443 }, { 0.98768834059513777, 0.15643446504023087 }, { -
      0.970031253194544, -0.24298017990326382 }, { 0.93819133592248416,
      0.34611705707749296 }, { -0.88650661594474645, -0.46271591704435 }, {
      0.80901699437494745, 0.58778525229247314 }, { -0.700130811898524,
      -0.71401459805126788 }, { 0.55557023301960229, 0.83146961230254524 }, { -
      0.37359497005251646, -0.927591935255724 }, { 0.15643446504023092,
      0.98768834059513777 }, { 0.088242370520369387, -0.99609903325168725 }, { -
      0.34611705707749268, 0.93819133592248427 }, { 0.5956993044924328,
      -0.80320753148064528 }, { -0.80901699437494734, 0.58778525229247325 }, {
      0.9540444024062803, -0.29966527699625722 }, { -0.9992290362407229,
      -0.039259815759068263 }, { 0.92007808433459493, 0.39173501085195589 }, { -
      0.70710678118654768, -0.70710678118654746 }, { 0.37359497005251635,
      0.927591935255724 }, { 0.039259815759068645, -0.9992290362407229 }, { -
      0.46271591704435006, 0.88650661594474645 }, { 0.80901699437494734,
      -0.58778525229247336 }, { -0.989176509964781, 0.1467304744553618 }, {
      0.93819133592248416, 0.34611705707749296 }, { -0.64195160256270323,
      -0.76674515972856139 }, { 0.15643446504023092, 0.98768834059513777 }, {
      0.39173501085195583, -0.92007808433459493 }, { -0.831469612302545,
      0.55557023301960251 }, { 0.999951808959328, 0.009817319337149617 }, { -
      0.80901699437494745, -0.587785252292473 }, { 0.29966527699625661,
      0.95404440240628041 }, { 0.346117057077493, -0.93819133592248416 }, { -
      0.857728610000272, 0.51410274419322177 }, { 0.98768834059513777,
      0.15643446504023087 }, { -0.64195160256270323, -0.76674515972856139 }, { -
      0.039259815759068326, 0.9992290362407229 }, { 0.71401459805126843,
      -0.70013081189852344 }, { -1.0, 1.2246467991473532E-16 }, {
      0.70013081189852366, 0.71401459805126821 }, { 0.039259815759068645,
      -0.9992290362407229 }, { -0.7667451597285615, 0.64195160256270312 }, {
      0.98768834059513777, 0.15643446504023087 }, { -0.51410274419322177,
      -0.857728610000272 }, { -0.34611705707749268, 0.93819133592248427 }, {
      0.9540444024062803, -0.29966527699625722 }, { -0.80901699437494745,
      -0.587785252292473 }, { -0.0098173193371496117, 0.999951808959328 }, {
      0.83146961230254524, -0.55557023301960218 }, { -0.92007808433459515,
      -0.3917350108519555 }, { 0.15643446504023092, 0.98768834059513777 }, {
      0.76674515972856139, -0.64195160256270323 }, { -0.938191335922484,
      -0.34611705707749307 }, { 0.14673047445536175, 0.989176509964781 }, {
      0.80901699437494734, -0.58778525229247336 }, { -0.88650661594474645,
      -0.46271591704435 }, { -0.039259815759068326, 0.9992290362407229 }, {
      0.927591935255724, -0.37359497005251652 }, { -0.70710678118654768,
      -0.70710678118654746 }, { -0.39173501085195594, 0.92007808433459493 }, {
      0.9992290362407229, 0.03925981575906861 }, { -0.29966527699625628,
      -0.95404440240628052 }, { -0.80901699437494734, 0.58778525229247325 }, {
      0.80320753148064494, 0.59569930449243325 }, { 0.346117057077493,
      -0.93819133592248416 }, { -0.99609903325168725, -0.088242370520369443 }, {
      0.15643446504023092, 0.98768834059513777 }, { 0.927591935255724,
      -0.37359497005251652 }, { -0.55557023301960218, -0.83146961230254524 }, {
      -0.71401459805126821, 0.70013081189852366 }, { 0.80901699437494745,
      0.58778525229247314 }, { 0.46271591704434956, -0.88650661594474667 }, { -
      0.938191335922484, -0.34611705707749307 }, { -0.24298017990326365,
      0.97003125319454409 }, { 0.98768834059513777, 0.15643446504023087 }, {
      0.088242370520369387, -0.99609903325168725 }, { -0.9992290362407229,
      -0.039259815759068263 }, { -0.0098173193371496117, 0.999951808959328 }, {
      1.0, -0.0 }, { 0.0098173193371490445, -0.999951808959328 }, { -
      0.9992290362407229, -0.039259815759068263 }, { -0.0882423705203695,
      0.99609903325168714 }, { 0.98768834059513777, 0.15643446504023087 }, {
      0.24298017990326376, -0.970031253194544 }, { -0.938191335922484,
      -0.34611705707749307 }, { -0.46271591704435006, 0.88650661594474645 }, {
      0.80901699437494745, 0.58778525229247314 }, { 0.71401459805126843,
      -0.70013081189852344 }, { -0.55557023301960218, -0.83146961230254524 }, {
      -0.927591935255724, 0.37359497005251641 }, { 0.15643446504023092,
      0.98768834059513777 }, { 0.99609903325168714, 0.088242370520369512 }, {
      0.346117057077493, -0.93819133592248416 }, { -0.80320753148064472,
      -0.59569930449243358 }, { -0.80901699437494734, 0.58778525229247325 }, {
      0.29966527699625661, 0.95404440240628041 }, { 0.9992290362407229,
      0.03925981575906861 }, { 0.39173501085195583, -0.92007808433459493 }, { -
      0.70710678118654768, -0.70710678118654746 }, { -0.927591935255724,
      0.37359497005251641 }, { -0.039259815759068326, 0.9992290362407229 }, {
      0.88650661594474645, 0.46271591704435 }, { 0.80901699437494734,
      -0.58778525229247336 }, { -0.1467304744553623, -0.9891765099647809 }, { -
      0.938191335922484, -0.34611705707749307 }, { -0.7667451597285615,
      0.64195160256270312 }, { 0.15643446504023092, 0.98768834059513777 }, {
      0.92007808433459493, 0.39173501085195589 }, { 0.83146961230254524,
      -0.55557023301960218 }, { 0.0098173193371490445, -0.999951808959328 }, { -
      0.80901699437494745, -0.587785252292473 }, { -0.95404440240628041,
      0.29966527699625667 }, { -0.34611705707749268, 0.93819133592248427 }, {
      0.51410274419322166, 0.85772861000027212 }, { 0.98768834059513777,
      0.15643446504023087 }, { 0.76674515972856139, -0.64195160256270323 }, {
      0.039259815759068645, -0.9992290362407229 }, { -0.700130811898524,
      -0.71401459805126788 }, { -1.0, 1.2246467991473532E-16 }, { -
      0.71401459805126821, 0.70013081189852366 }, { -0.039259815759068326,
      0.9992290362407229 }, { 0.64195160256270312, 0.7667451597285615 }, {
      0.98768834059513777, 0.15643446504023087 }, { 0.857728610000272,
      -0.51410274419322188 }, { 0.346117057077493, -0.93819133592248416 }, { -
      0.29966527699625628, -0.95404440240628052 }, { -0.80901699437494745,
      -0.587785252292473 }, { -0.999951808959328, -0.009817319337149551 }, { -
      0.831469612302545, 0.55557023301960251 }, { -0.39173501085195594,
      0.92007808433459493 }, { 0.15643446504023092, 0.98768834059513777 }, {
      0.64195160256270312, 0.7667451597285615 }, { 0.93819133592248416,
      0.34611705707749296 }, { 0.989176509964781, -0.1467304744553615 }, {
      0.80901699437494734, -0.58778525229247336 }, { 0.46271591704434956,
      -0.88650661594474667 }, { 0.039259815759068645, -0.9992290362407229 }, { -
      0.37359497005251646, -0.927591935255724 }, { -0.70710678118654768,
      -0.70710678118654746 }, { -0.92007808433459515, -0.3917350108519555 }, { -
      0.9992290362407229, -0.039259815759068263 }, { -0.95404440240628041,
      0.29966527699625667 }, { -0.80901699437494734, 0.58778525229247325 }, { -
      0.59569930449243336, 0.80320753148064494 }, { -0.34611705707749268,
      0.93819133592248427 }, { -0.0882423705203695, 0.99609903325168714 }, {
      0.15643446504023092, 0.98768834059513777 }, { 0.37359497005251635,
      0.927591935255724 }, { 0.55557023301960229, 0.83146961230254524 }, {
      0.70013081189852366, 0.71401459805126821 }, { 0.80901699437494745,
      0.58778525229247314 }, { 0.88650661594474645, 0.46271591704435 }, {
      0.93819133592248416, 0.34611705707749296 }, { 0.970031253194544,
      0.24298017990326387 }, { 0.98768834059513777, 0.15643446504023087 }, {
      0.99609903325168714, 0.088242370520369512 }, { 0.9992290362407229,
      0.03925981575906861 }, { 0.999951808959328, 0.009817319337149617 }, { 1.0,
      0.0 }, { 0.999951808959328, 0.009817319337149617 }, { 0.9992290362407229,
      0.03925981575906861 }, { 0.99609903325168714, 0.088242370520369512 }, {
      0.98768834059513777, 0.15643446504023087 }, { 0.970031253194544,
      0.24298017990326387 }, { 0.93819133592248416, 0.34611705707749296 }, {
      0.88650661594474645, 0.46271591704435 }, { 0.80901699437494745,
      0.58778525229247314 }, { 0.70013081189852366, 0.71401459805126821 }, {
      0.55557023301960229, 0.83146961230254524 }, { 0.37359497005251635,
      0.927591935255724 }, { 0.15643446504023092, 0.98768834059513777 }, { -
      0.0882423705203695, 0.99609903325168714 }, { -0.34611705707749268,
      0.93819133592248427 }, { -0.59569930449243336, 0.80320753148064494 }, { -
      0.80901699437494734, 0.58778525229247325 }, { -0.95404440240628041,
      0.29966527699625667 }, { -0.9992290362407229, -0.039259815759068263 }, { -
      0.92007808433459515, -0.3917350108519555 }, { -0.70710678118654768,
      -0.70710678118654746 }, { -0.37359497005251646, -0.927591935255724 }, {
      0.039259815759068645, -0.9992290362407229 }, { 0.46271591704434956,
      -0.88650661594474667 }, { 0.80901699437494734, -0.58778525229247336 }, {
      0.989176509964781, -0.1467304744553615 }, { 0.93819133592248416,
      0.34611705707749296 }, { 0.64195160256270312, 0.7667451597285615 }, {
      0.15643446504023092, 0.98768834059513777 }, { -0.39173501085195594,
      0.92007808433459493 }, { -0.831469612302545, 0.55557023301960251 }, { -
      0.999951808959328, -0.009817319337149551 }, { -0.80901699437494745,
      -0.587785252292473 }, { -0.29966527699625628, -0.95404440240628052 }, {
      0.346117057077493, -0.93819133592248416 }, { 0.857728610000272,
      -0.51410274419322188 }, { 0.98768834059513777, 0.15643446504023087 }, {
      0.64195160256270312, 0.7667451597285615 }, { -0.039259815759068326,
      0.9992290362407229 }, { -0.71401459805126821, 0.70013081189852366 }, { -
      1.0, 1.2246467991473532E-16 }, { -0.700130811898524, -0.71401459805126788
    }, { 0.039259815759068645, -0.9992290362407229 }, { 0.76674515972856139,
      -0.64195160256270323 }, { 0.98768834059513777, 0.15643446504023087 }, {
      0.51410274419322166, 0.85772861000027212 }, { -0.34611705707749268,
      0.93819133592248427 }, { -0.95404440240628041, 0.29966527699625667 }, { -
      0.80901699437494745, -0.587785252292473 }, { 0.0098173193371490445,
      -0.999951808959328 }, { 0.83146961230254524, -0.55557023301960218 }, {
      0.92007808433459493, 0.39173501085195589 }, { 0.15643446504023092,
      0.98768834059513777 }, { -0.7667451597285615, 0.64195160256270312 }, { -
      0.938191335922484, -0.34611705707749307 }, { -0.1467304744553623,
      -0.9891765099647809 }, { 0.80901699437494734, -0.58778525229247336 }, {
      0.88650661594474645, 0.46271591704435 }, { -0.039259815759068326,
      0.9992290362407229 }, { -0.927591935255724, 0.37359497005251641 }, { -
      0.70710678118654768, -0.70710678118654746 }, { 0.39173501085195583,
      -0.92007808433459493 }, { 0.9992290362407229, 0.03925981575906861 }, {
      0.29966527699625661, 0.95404440240628041 }, { -0.80901699437494734,
      0.58778525229247325 }, { -0.80320753148064472, -0.59569930449243358 }, {
      0.346117057077493, -0.93819133592248416 }, { 0.99609903325168714,
      0.088242370520369512 }, { 0.15643446504023092, 0.98768834059513777 }, { -
      0.927591935255724, 0.37359497005251641 }, { -0.55557023301960218,
      -0.83146961230254524 }, { 0.71401459805126843, -0.70013081189852344 }, {
      0.80901699437494745, 0.58778525229247314 }, { -0.46271591704435006,
      0.88650661594474645 }, { -0.938191335922484, -0.34611705707749307 }, {
      0.24298017990326376, -0.970031253194544 }, { 0.98768834059513777,
      0.15643446504023087 }, { -0.0882423705203695, 0.99609903325168714 }, { -
      0.9992290362407229, -0.039259815759068263 }, { 0.0098173193371490445,
      -0.999951808959328 }, { 1.0, -0.0 }, { -0.0098173193371496117,
      0.999951808959328 }, { -0.9992290362407229, -0.039259815759068263 }, {
      0.088242370520369387, -0.99609903325168725 }, { 0.98768834059513777,
      0.15643446504023087 }, { -0.24298017990326365, 0.97003125319454409 }, { -
      0.938191335922484, -0.34611705707749307 }, { 0.46271591704434956,
      -0.88650661594474667 }, { 0.80901699437494745, 0.58778525229247314 }, { -
      0.71401459805126821, 0.70013081189852366 }, { -0.55557023301960218,
      -0.83146961230254524 }, { 0.927591935255724, -0.37359497005251652 }, {
      0.15643446504023092, 0.98768834059513777 }, { -0.99609903325168725,
      -0.088242370520369443 }, { 0.346117057077493, -0.93819133592248416 }, {
      0.80320753148064494, 0.59569930449243325 }, { -0.80901699437494734,
      0.58778525229247325 }, { -0.29966527699625628, -0.95404440240628052 }, {
      0.9992290362407229, 0.03925981575906861 }, { -0.39173501085195594,
      0.92007808433459493 }, { -0.70710678118654768, -0.70710678118654746 }, {
      0.927591935255724, -0.37359497005251652 }, { -0.039259815759068326,
      0.9992290362407229 }, { -0.88650661594474645, -0.46271591704435 }, {
      0.80901699437494734, -0.58778525229247336 }, { 0.14673047445536175,
      0.989176509964781 }, { -0.938191335922484, -0.34611705707749307 }, {
      0.76674515972856139, -0.64195160256270323 }, { 0.15643446504023092,
      0.98768834059513777 }, { -0.92007808433459515, -0.3917350108519555 }, {
      0.83146961230254524, -0.55557023301960218 }, { -0.0098173193371496117,
      0.999951808959328 }, { -0.80901699437494745, -0.587785252292473 }, {
      0.9540444024062803, -0.29966527699625722 }, { -0.34611705707749268,
      0.93819133592248427 }, { -0.51410274419322177, -0.857728610000272 }, {
      0.98768834059513777, 0.15643446504023087 }, { -0.7667451597285615,
      0.64195160256270312 }, { 0.039259815759068645, -0.9992290362407229 }, {
      0.70013081189852366, 0.71401459805126821 }, { -1.0, 1.2246467991473532E-16
    }, { 0.71401459805126843, -0.70013081189852344 }, { -0.039259815759068326,
      0.9992290362407229 }, { -0.64195160256270323, -0.76674515972856139 }, {
      0.98768834059513777, 0.15643446504023087 }, { -0.857728610000272,
      0.51410274419322177 }, { 0.346117057077493, -0.93819133592248416 }, {
      0.29966527699625661, 0.95404440240628041 }, { -0.80901699437494745,
      -0.587785252292473 }, { 0.999951808959328, 0.009817319337149617 }, { -
      0.831469612302545, 0.55557023301960251 }, { 0.39173501085195583,
      -0.92007808433459493 }, { 0.15643446504023092, 0.98768834059513777 }, { -
      0.64195160256270323, -0.76674515972856139 }, { 0.93819133592248416,
      0.34611705707749296 }, { -0.989176509964781, 0.1467304744553618 }, {
      0.80901699437494734, -0.58778525229247336 }, { -0.46271591704435006,
      0.88650661594474645 }, { 0.039259815759068645, -0.9992290362407229 }, {
      0.37359497005251635, 0.927591935255724 }, { -0.70710678118654768,
      -0.70710678118654746 }, { 0.92007808433459493, 0.39173501085195589 }, { -
      0.9992290362407229, -0.039259815759068263 }, { 0.9540444024062803,
      -0.29966527699625722 }, { -0.80901699437494734, 0.58778525229247325 }, {
      0.5956993044924328, -0.80320753148064528 }, { -0.34611705707749268,
      0.93819133592248427 }, { 0.088242370520369387, -0.99609903325168725 }, {
      0.15643446504023092, 0.98768834059513777 }, { -0.37359497005251646,
      -0.927591935255724 }, { 0.55557023301960229, 0.83146961230254524 }, { -
      0.700130811898524, -0.71401459805126788 }, { 0.80901699437494745,
      0.58778525229247314 }, { -0.88650661594474645, -0.46271591704435 }, {
      0.93819133592248416, 0.34611705707749296 }, { -0.970031253194544,
      -0.24298017990326382 }, { 0.98768834059513777, 0.15643446504023087 }, { -
      0.99609903325168725, -0.088242370520369443 }, { 0.9992290362407229,
      0.03925981575906861 }, { -0.999951808959328, -0.009817319337149551 }, {
      1.0, -0.0 }, { -0.999951808959328, -0.009817319337149551 }, {
      0.9992290362407229, 0.03925981575906861 }, { -0.99609903325168725,
      -0.088242370520369443 }, { 0.98768834059513777, 0.15643446504023087 }, { -
      0.970031253194544, -0.24298017990326382 }, { 0.93819133592248416,
      0.34611705707749296 }, { -0.88650661594474645, -0.46271591704435 }, {
      0.80901699437494745, 0.58778525229247314 }, { -0.700130811898524,
      -0.71401459805126788 }, { 0.55557023301960229, 0.83146961230254524 }, { -
      0.37359497005251646, -0.927591935255724 }, { 0.15643446504023092,
      0.98768834059513777 }, { 0.088242370520369387, -0.99609903325168725 }, { -
      0.34611705707749268, 0.93819133592248427 }, { 0.5956993044924328,
      -0.80320753148064528 }, { -0.80901699437494734, 0.58778525229247325 }, {
      0.9540444024062803, -0.29966527699625722 }, { -0.9992290362407229,
      -0.039259815759068263 }, { 0.92007808433459493, 0.39173501085195589 }, { -
      0.70710678118654768, -0.70710678118654746 }, { 0.37359497005251635,
      0.927591935255724 }, { 0.039259815759068645, -0.9992290362407229 }, { -
      0.46271591704435006, 0.88650661594474645 }, { 0.80901699437494734,
      -0.58778525229247336 }, { -0.989176509964781, 0.1467304744553618 }, {
      0.93819133592248416, 0.34611705707749296 }, { -0.64195160256270323,
      -0.76674515972856139 }, { 0.15643446504023092, 0.98768834059513777 }, {
      0.39173501085195583, -0.92007808433459493 }, { -0.831469612302545,
      0.55557023301960251 }, { 0.999951808959328, 0.009817319337149617 }, { -
      0.80901699437494745, -0.587785252292473 }, { 0.29966527699625661,
      0.95404440240628041 }, { 0.346117057077493, -0.93819133592248416 }, { -
      0.857728610000272, 0.51410274419322177 }, { 0.98768834059513777,
      0.15643446504023087 }, { -0.64195160256270323, -0.76674515972856139 }, { -
      0.039259815759068326, 0.9992290362407229 }, { 0.71401459805126843,
      -0.70013081189852344 }, { -1.0, 1.2246467991473532E-16 }, {
      0.70013081189852366, 0.71401459805126821 }, { 0.039259815759068645,
      -0.9992290362407229 }, { -0.7667451597285615, 0.64195160256270312 }, {
      0.98768834059513777, 0.15643446504023087 }, { -0.51410274419322177,
      -0.857728610000272 }, { -0.34611705707749268, 0.93819133592248427 }, {
      0.9540444024062803, -0.29966527699625722 }, { -0.80901699437494745,
      -0.587785252292473 }, { -0.0098173193371496117, 0.999951808959328 }, {
      0.83146961230254524, -0.55557023301960218 }, { -0.92007808433459515,
      -0.3917350108519555 }, { 0.15643446504023092, 0.98768834059513777 }, {
      0.76674515972856139, -0.64195160256270323 }, { -0.938191335922484,
      -0.34611705707749307 }, { 0.14673047445536175, 0.989176509964781 }, {
      0.80901699437494734, -0.58778525229247336 }, { -0.88650661594474645,
      -0.46271591704435 }, { -0.039259815759068326, 0.9992290362407229 }, {
      0.927591935255724, -0.37359497005251652 }, { -0.70710678118654768,
      -0.70710678118654746 }, { -0.39173501085195594, 0.92007808433459493 }, {
      0.9992290362407229, 0.03925981575906861 }, { -0.29966527699625628,
      -0.95404440240628052 }, { -0.80901699437494734, 0.58778525229247325 }, {
      0.80320753148064494, 0.59569930449243325 }, { 0.346117057077493,
      -0.93819133592248416 }, { -0.99609903325168725, -0.088242370520369443 }, {
      0.15643446504023092, 0.98768834059513777 }, { 0.927591935255724,
      -0.37359497005251652 }, { -0.55557023301960218, -0.83146961230254524 }, {
      -0.71401459805126821, 0.70013081189852366 }, { 0.80901699437494745,
      0.58778525229247314 }, { 0.46271591704434956, -0.88650661594474667 }, { -
      0.938191335922484, -0.34611705707749307 }, { -0.24298017990326365,
      0.97003125319454409 }, { 0.98768834059513777, 0.15643446504023087 }, {
      0.088242370520369387, -0.99609903325168725 }, { -0.9992290362407229,
      -0.039259815759068263 }, { -0.0098173193371496117, 0.999951808959328 }, {
      1.0, -0.0 }, { 0.0098173193371490445, -0.999951808959328 }, { -
      0.9992290362407229, -0.039259815759068263 }, { -0.0882423705203695,
      0.99609903325168714 }, { 0.98768834059513777, 0.15643446504023087 }, {
      0.24298017990326376, -0.970031253194544 }, { -0.938191335922484,
      -0.34611705707749307 }, { -0.46271591704435006, 0.88650661594474645 }, {
      0.80901699437494745, 0.58778525229247314 }, { 0.71401459805126843,
      -0.70013081189852344 }, { -0.55557023301960218, -0.83146961230254524 }, {
      -0.927591935255724, 0.37359497005251641 }, { 0.15643446504023092,
      0.98768834059513777 }, { 0.99609903325168714, 0.088242370520369512 }, {
      0.346117057077493, -0.93819133592248416 }, { -0.80320753148064472,
      -0.59569930449243358 }, { -0.80901699437494734, 0.58778525229247325 }, {
      0.29966527699625661, 0.95404440240628041 }, { 0.9992290362407229,
      0.03925981575906861 }, { 0.39173501085195583, -0.92007808433459493 }, { -
      0.70710678118654768, -0.70710678118654746 }, { -0.927591935255724,
      0.37359497005251641 }, { -0.039259815759068326, 0.9992290362407229 }, {
      0.88650661594474645, 0.46271591704435 }, { 0.80901699437494734,
      -0.58778525229247336 }, { -0.1467304744553623, -0.9891765099647809 }, { -
      0.938191335922484, -0.34611705707749307 }, { -0.7667451597285615,
      0.64195160256270312 }, { 0.15643446504023092, 0.98768834059513777 }, {
      0.92007808433459493, 0.39173501085195589 }, { 0.83146961230254524,
      -0.55557023301960218 }, { 0.0098173193371490445, -0.999951808959328 }, { -
      0.80901699437494745, -0.587785252292473 }, { -0.95404440240628041,
      0.29966527699625667 }, { -0.34611705707749268, 0.93819133592248427 }, {
      0.51410274419322166, 0.85772861000027212 }, { 0.98768834059513777,
      0.15643446504023087 }, { 0.76674515972856139, -0.64195160256270323 }, {
      0.039259815759068645, -0.9992290362407229 }, { -0.700130811898524,
      -0.71401459805126788 }, { -1.0, 1.2246467991473532E-16 }, { -
      0.71401459805126821, 0.70013081189852366 }, { -0.039259815759068326,
      0.9992290362407229 }, { 0.64195160256270312, 0.7667451597285615 }, {
      0.98768834059513777, 0.15643446504023087 }, { 0.857728610000272,
      -0.51410274419322188 }, { 0.346117057077493, -0.93819133592248416 }, { -
      0.29966527699625628, -0.95404440240628052 }, { -0.80901699437494745,
      -0.587785252292473 }, { -0.999951808959328, -0.009817319337149551 }, { -
      0.831469612302545, 0.55557023301960251 }, { -0.39173501085195594,
      0.92007808433459493 }, { 0.15643446504023092, 0.98768834059513777 }, {
      0.64195160256270312, 0.7667451597285615 }, { 0.93819133592248416,
      0.34611705707749296 }, { 0.989176509964781, -0.1467304744553615 }, {
      0.80901699437494734, -0.58778525229247336 }, { 0.46271591704434956,
      -0.88650661594474667 }, { 0.039259815759068645, -0.9992290362407229 }, { -
      0.37359497005251646, -0.927591935255724 }, { -0.70710678118654768,
      -0.70710678118654746 }, { -0.92007808433459515, -0.3917350108519555 }, { -
      0.9992290362407229, -0.039259815759068263 }, { -0.95404440240628041,
      0.29966527699625667 }, { -0.80901699437494734, 0.58778525229247325 }, { -
      0.59569930449243336, 0.80320753148064494 }, { -0.34611705707749268,
      0.93819133592248427 }, { -0.0882423705203695, 0.99609903325168714 }, {
      0.15643446504023092, 0.98768834059513777 }, { 0.37359497005251635,
      0.927591935255724 }, { 0.55557023301960229, 0.83146961230254524 }, {
      0.70013081189852366, 0.71401459805126821 }, { 0.80901699437494745,
      0.58778525229247314 }, { 0.88650661594474645, 0.46271591704435 }, {
      0.93819133592248416, 0.34611705707749296 }, { 0.970031253194544,
      0.24298017990326387 }, { 0.98768834059513777, 0.15643446504023087 }, {
      0.99609903325168714, 0.088242370520369512 }, { 0.9992290362407229,
      0.03925981575906861 }, { 0.999951808959328, 0.009817319337149617 } };

  static creal_T dcv0[1024];
  static creal_T b_fv[1024];
  static const double sintabinv[513] = { 0.0, 0.0061358846491544753,
    0.012271538285719925, 0.01840672990580482, 0.024541228522912288,
    0.030674803176636626, 0.036807222941358832, 0.04293825693494082,
    0.049067674327418015, 0.055195244349689941, 0.061320736302208578,
    0.067443919563664051, 0.073564563599667426, 0.079682437971430126,
    0.0857973123444399, 0.091908956497132724, 0.0980171403295606,
    0.10412163387205459, 0.11022220729388306, 0.11631863091190475,
    0.1224106751992162, 0.12849811079379317, 0.13458070850712617,
    0.14065823933284921, 0.14673047445536175, 0.15279718525844344,
    0.15885814333386145, 0.16491312048996992, 0.17096188876030122,
    0.17700422041214875, 0.18303988795514095, 0.18906866414980619,
    0.19509032201612825, 0.2011046348420919, 0.20711137619221856,
    0.21311031991609136, 0.2191012401568698, 0.22508391135979283,
    0.23105810828067111, 0.2370236059943672, 0.24298017990326387,
    0.24892760574572015, 0.25486565960451457, 0.26079411791527551,
    0.26671275747489837, 0.272621355449949, 0.27851968938505306,
    0.28440753721127188, 0.29028467725446233, 0.29615088824362379,
    0.30200594931922808, 0.30784964004153487, 0.31368174039889152,
    0.31950203081601569, 0.32531029216226293, 0.33110630575987643,
    0.33688985339222005, 0.34266071731199438, 0.34841868024943456,
    0.35416352542049034, 0.35989503653498811, 0.36561299780477385,
    0.37131719395183749, 0.37700741021641826, 0.38268343236508978,
    0.38834504669882625, 0.3939920400610481, 0.39962419984564679,
    0.40524131400498986, 0.41084317105790391, 0.41642956009763715,
    0.42200027079979968, 0.42755509343028208, 0.43309381885315196,
    0.43861623853852766, 0.4441221445704292, 0.44961132965460654,
    0.45508358712634384, 0.46053871095824, 0.46597649576796618,
    0.47139673682599764, 0.47679923006332209, 0.48218377207912272,
    0.487550160148436, 0.49289819222978404, 0.49822766697278181,
    0.50353838372571758, 0.508830142543107, 0.51410274419322166,
    0.51935599016558964, 0.524589682678469, 0.52980362468629461,
    0.53499761988709715, 0.54017147272989285, 0.54532498842204646,
    0.55045797293660481, 0.55557023301960218, 0.560661576197336,
    0.56573181078361312, 0.57078074588696726, 0.57580819141784534,
    0.58081395809576453, 0.58579785745643886, 0.59075970185887416,
    0.59569930449243336, 0.600616479383869, 0.60551104140432555,
    0.61038280627630948, 0.61523159058062682, 0.6200572117632891,
    0.62485948814238634, 0.629638238914927, 0.63439328416364549,
    0.63912444486377573, 0.64383154288979139, 0.64851440102211244,
    0.65317284295377676, 0.65780669329707864, 0.66241577759017178,
    0.66699992230363747, 0.67155895484701833, 0.67609270357531592,
    0.680600997795453, 0.68508366777270036, 0.68954054473706683,
    0.69397146088965389, 0.69837624940897292, 0.7027547444572253,
    0.70710678118654757, 0.71143219574521643, 0.71573082528381859,
    0.72000250796138165, 0.724247082951467, 0.7284643904482252,
    0.73265427167241282, 0.73681656887736979, 0.74095112535495922,
    0.745057785441466, 0.74913639452345937, 0.75318679904361252,
    0.75720884650648457, 0.76120238548426178, 0.765167265622459,
    0.7691033376455797, 0.773010453362737, 0.77688846567323244,
    0.78073722857209449, 0.78455659715557524, 0.78834642762660634,
    0.79210657730021239, 0.79583690460888357, 0.799537269107905,
    0.80320753148064494, 0.80684755354379933, 0.81045719825259477,
    0.81403632970594841, 0.81758481315158371, 0.82110251499110465,
    0.82458930278502529, 0.8280450452577558, 0.83146961230254524,
    0.83486287498638, 0.83822470555483808, 0.84155497743689844,
    0.84485356524970712, 0.84812034480329723, 0.8513551931052652,
    0.85455798836540053, 0.85772861000027212, 0.86086693863776731,
    0.8639728561215867, 0.86704624551569265, 0.87008699110871146,
    0.87309497841829009, 0.8760700941954066, 0.87901222642863353,
    0.881921264348355, 0.88479709843093779, 0.88763962040285393,
    0.89044872324475788, 0.89322430119551532, 0.89596624975618522,
    0.89867446569395382, 0.901348847046022, 0.90398929312344334,
    0.90659570451491533, 0.90916798309052238, 0.91170603200542988,
    0.91420975570353069, 0.9166790599210427, 0.91911385169005777,
    0.9215140393420419, 0.92387953251128674, 0.92621024213831138,
    0.92850608047321559, 0.93076696107898371, 0.932992798834739,
    0.93518350993894761, 0.937339011912575, 0.93945922360218992,
    0.94154406518302081, 0.94359345816196039, 0.94560732538052128,
    0.94758559101774109, 0.94952818059303667, 0.95143502096900834,
    0.95330604035419386, 0.95514116830577078, 0.95694033573220882,
    0.9587034748958716, 0.96043051941556579, 0.96212140426904158,
    0.96377606579543984, 0.9653944416976894, 0.96697647104485207,
    0.96852209427441727, 0.970031253194544, 0.97150389098625178,
    0.97293995220556018, 0.97433938278557586, 0.97570213003852857,
    0.97702814265775439, 0.97831737071962765, 0.97956976568544052,
    0.98078528040323043, 0.98196386910955524, 0.98310548743121629,
    0.984210092386929, 0.98527764238894122, 0.98630809724459867,
    0.98730141815785843, 0.98825756773074946, 0.989176509964781,
    0.99005821026229712, 0.99090263542778, 0.99170975366909953, 0.99247953459871,
    0.9932119492347945, 0.99390697000235606, 0.99456457073425542,
    0.99518472667219693, 0.99576741446765982, 0.996312612182778,
    0.99682029929116567, 0.99729045667869021, 0.99772306664419164,
    0.99811811290014918, 0.99847558057329477, 0.99879545620517241,
    0.99907772775264536, 0.99932238458834954, 0.99952941750109314,
    0.99969881869620425, 0.9998305817958234, 0.9999247018391445,
    0.99998117528260111, 1.0, 0.99998117528260111, 0.9999247018391445,
    0.9998305817958234, 0.99969881869620425, 0.99952941750109314,
    0.99932238458834954, 0.99907772775264536, 0.99879545620517241,
    0.99847558057329477, 0.99811811290014918, 0.99772306664419164,
    0.99729045667869021, 0.99682029929116567, 0.996312612182778,
    0.99576741446765982, 0.99518472667219693, 0.99456457073425542,
    0.99390697000235606, 0.9932119492347945, 0.99247953459871,
    0.99170975366909953, 0.99090263542778, 0.99005821026229712,
    0.989176509964781, 0.98825756773074946, 0.98730141815785843,
    0.98630809724459867, 0.98527764238894122, 0.984210092386929,
    0.98310548743121629, 0.98196386910955524, 0.98078528040323043,
    0.97956976568544052, 0.97831737071962765, 0.97702814265775439,
    0.97570213003852857, 0.97433938278557586, 0.97293995220556018,
    0.97150389098625178, 0.970031253194544, 0.96852209427441727,
    0.96697647104485207, 0.9653944416976894, 0.96377606579543984,
    0.96212140426904158, 0.96043051941556579, 0.9587034748958716,
    0.95694033573220882, 0.95514116830577078, 0.95330604035419386,
    0.95143502096900834, 0.94952818059303667, 0.94758559101774109,
    0.94560732538052128, 0.94359345816196039, 0.94154406518302081,
    0.93945922360218992, 0.937339011912575, 0.93518350993894761,
    0.932992798834739, 0.93076696107898371, 0.92850608047321559,
    0.92621024213831138, 0.92387953251128674, 0.9215140393420419,
    0.91911385169005777, 0.9166790599210427, 0.91420975570353069,
    0.91170603200542988, 0.90916798309052238, 0.90659570451491533,
    0.90398929312344334, 0.901348847046022, 0.89867446569395382,
    0.89596624975618522, 0.89322430119551532, 0.89044872324475788,
    0.88763962040285393, 0.88479709843093779, 0.881921264348355,
    0.87901222642863353, 0.8760700941954066, 0.87309497841829009,
    0.87008699110871146, 0.86704624551569265, 0.8639728561215867,
    0.86086693863776731, 0.85772861000027212, 0.85455798836540053,
    0.8513551931052652, 0.84812034480329723, 0.84485356524970712,
    0.84155497743689844, 0.83822470555483808, 0.83486287498638,
    0.83146961230254524, 0.8280450452577558, 0.82458930278502529,
    0.82110251499110465, 0.81758481315158371, 0.81403632970594841,
    0.81045719825259477, 0.80684755354379933, 0.80320753148064494,
    0.799537269107905, 0.79583690460888357, 0.79210657730021239,
    0.78834642762660634, 0.78455659715557524, 0.78073722857209449,
    0.77688846567323244, 0.773010453362737, 0.7691033376455797,
    0.765167265622459, 0.76120238548426178, 0.75720884650648457,
    0.75318679904361252, 0.74913639452345937, 0.745057785441466,
    0.74095112535495922, 0.73681656887736979, 0.73265427167241282,
    0.7284643904482252, 0.724247082951467, 0.72000250796138165,
    0.71573082528381859, 0.71143219574521643, 0.70710678118654757,
    0.7027547444572253, 0.69837624940897292, 0.69397146088965389,
    0.68954054473706683, 0.68508366777270036, 0.680600997795453,
    0.67609270357531592, 0.67155895484701833, 0.66699992230363747,
    0.66241577759017178, 0.65780669329707864, 0.65317284295377676,
    0.64851440102211244, 0.64383154288979139, 0.63912444486377573,
    0.63439328416364549, 0.629638238914927, 0.62485948814238634,
    0.6200572117632891, 0.61523159058062682, 0.61038280627630948,
    0.60551104140432555, 0.600616479383869, 0.59569930449243336,
    0.59075970185887416, 0.58579785745643886, 0.58081395809576453,
    0.57580819141784534, 0.57078074588696726, 0.56573181078361312,
    0.560661576197336, 0.55557023301960218, 0.55045797293660481,
    0.54532498842204646, 0.54017147272989285, 0.53499761988709715,
    0.52980362468629461, 0.524589682678469, 0.51935599016558964,
    0.51410274419322166, 0.508830142543107, 0.50353838372571758,
    0.49822766697278181, 0.49289819222978404, 0.487550160148436,
    0.48218377207912272, 0.47679923006332209, 0.47139673682599764,
    0.46597649576796618, 0.46053871095824, 0.45508358712634384,
    0.44961132965460654, 0.4441221445704292, 0.43861623853852766,
    0.43309381885315196, 0.42755509343028208, 0.42200027079979968,
    0.41642956009763715, 0.41084317105790391, 0.40524131400498986,
    0.39962419984564679, 0.3939920400610481, 0.38834504669882625,
    0.38268343236508978, 0.37700741021641826, 0.37131719395183749,
    0.36561299780477385, 0.35989503653498811, 0.35416352542049034,
    0.34841868024943456, 0.34266071731199438, 0.33688985339222005,
    0.33110630575987643, 0.32531029216226293, 0.31950203081601569,
    0.31368174039889152, 0.30784964004153487, 0.30200594931922808,
    0.29615088824362379, 0.29028467725446233, 0.28440753721127188,
    0.27851968938505306, 0.272621355449949, 0.26671275747489837,
    0.26079411791527551, 0.25486565960451457, 0.24892760574572015,
    0.24298017990326387, 0.2370236059943672, 0.23105810828067111,
    0.22508391135979283, 0.2191012401568698, 0.21311031991609136,
    0.20711137619221856, 0.2011046348420919, 0.19509032201612825,
    0.18906866414980619, 0.18303988795514095, 0.17700422041214875,
    0.17096188876030122, 0.16491312048996992, 0.15885814333386145,
    0.15279718525844344, 0.14673047445536175, 0.14065823933284921,
    0.13458070850712617, 0.12849811079379317, 0.1224106751992162,
    0.11631863091190475, 0.11022220729388306, 0.10412163387205459,
    0.0980171403295606, 0.091908956497132724, 0.0857973123444399,
    0.079682437971430126, 0.073564563599667426, 0.067443919563664051,
    0.061320736302208578, 0.055195244349689941, 0.049067674327418015,
    0.04293825693494082, 0.036807222941358832, 0.030674803176636626,
    0.024541228522912288, 0.01840672990580482, 0.012271538285719925,
    0.0061358846491544753, 0.0 };

  xidx = 0;
  for (k = 0; k < 320; k++) {
    y[k].re = wwc[k + 319].re * x[xidx];
    y[k].im = wwc[k + 319].im * -x[xidx];
    xidx++;
  }

  r2br_r2dit_trig_impl(y, costab, sintab, fv);
  r2br_r2dit_trig(wwc, costab, sintab, dcv0);
  for (xidx = 0; xidx < 1024; xidx++) {
    b_fv[xidx].re = fv[xidx].re * dcv0[xidx].re - fv[xidx].im * dcv0[xidx].im;
    b_fv[xidx].im = fv[xidx].re * dcv0[xidx].im + fv[xidx].im * dcv0[xidx].re;
  }

  b_r2br_r2dit_trig(b_fv, costab, sintabinv, fv);
  xidx = 0;
  for (k = 0; k < 320; k++) {
    y[xidx].re = wwc[k + 319].re * fv[k + 319].re + wwc[k + 319].im * fv[k + 319]
      .im;
    y[xidx].im = wwc[k + 319].re * fv[k + 319].im - wwc[k + 319].im * fv[k + 319]
      .re;
    xidx++;
  }
}

static void power(const double a[158], double y[158])
{
  int k;
  for (k = 0; k < 158; k++) {
    y[k] = a[k] * a[k];
  }
}

static void r2br_r2dit_trig(const creal_T x[639], const double costab[513],
  const double sintab[513], creal_T y[1024])
{
  int i;
  int ix;
  int ju;
  int iy;
  boolean_T tst;
  double temp_re;
  double temp_im;
  int iheight;
  int istart;
  int j;
  double twid_re;
  double twid_im;
  int ihi;
  for (i = 0; i < 1024; i++) {
    y[i].re = 0.0;
    y[i].im = 0.0;
  }

  ix = 0;
  ju = 0;
  iy = 0;
  for (i = 0; i < 638; i++) {
    y[iy] = x[ix];
    iy = 1024;
    tst = true;
    while (tst) {
      iy >>= 1;
      ju ^= iy;
      tst = ((ju & iy) == 0);
    }

    iy = ju;
    ix++;
  }

  y[iy] = x[ix];
  for (i = 0; i <= 1023; i += 2) {
    temp_re = y[i + 1].re;
    temp_im = y[i + 1].im;
    y[i + 1].re = y[i].re - y[i + 1].re;
    y[i + 1].im = y[i].im - y[i + 1].im;
    y[i].re += temp_re;
    y[i].im += temp_im;
  }

  iy = 2;
  ix = 4;
  ju = 256;
  iheight = 1021;
  while (ju > 0) {
    for (i = 0; i < iheight; i += ix) {
      temp_re = y[i + iy].re;
      temp_im = y[i + iy].im;
      y[i + iy].re = y[i].re - temp_re;
      y[i + iy].im = y[i].im - temp_im;
      y[i].re += temp_re;
      y[i].im += temp_im;
    }

    istart = 1;
    for (j = ju; j < 512; j += ju) {
      twid_re = costab[j];
      twid_im = sintab[j];
      i = istart;
      ihi = istart + iheight;
      while (i < ihi) {
        temp_re = twid_re * y[i + iy].re - twid_im * y[i + iy].im;
        temp_im = twid_re * y[i + iy].im + twid_im * y[i + iy].re;
        y[i + iy].re = y[i].re - temp_re;
        y[i + iy].im = y[i].im - temp_im;
        y[i].re += temp_re;
        y[i].im += temp_im;
        i += ix;
      }

      istart++;
    }

    ju /= 2;
    iy = ix;
    ix += ix;
    iheight -= iy;
  }
}

static void r2br_r2dit_trig_impl(const creal_T x[320], const double costab[513],
  const double sintab[513], creal_T y[1024])
{
  int i;
  int ix;
  int ju;
  int iy;
  boolean_T tst;
  double temp_re;
  double temp_im;
  int iheight;
  int istart;
  int j;
  double twid_re;
  double twid_im;
  int ihi;
  for (i = 0; i < 1024; i++) {
    y[i].re = 0.0;
    y[i].im = 0.0;
  }

  ix = 0;
  ju = 0;
  iy = 0;
  for (i = 0; i < 319; i++) {
    y[iy] = x[ix];
    iy = 1024;
    tst = true;
    while (tst) {
      iy >>= 1;
      ju ^= iy;
      tst = ((ju & iy) == 0);
    }

    iy = ju;
    ix++;
  }

  y[iy] = x[ix];
  for (i = 0; i <= 1023; i += 2) {
    temp_re = y[i + 1].re;
    temp_im = y[i + 1].im;
    y[i + 1].re = y[i].re - y[i + 1].re;
    y[i + 1].im = y[i].im - y[i + 1].im;
    y[i].re += temp_re;
    y[i].im += temp_im;
  }

  iy = 2;
  ix = 4;
  ju = 256;
  iheight = 1021;
  while (ju > 0) {
    for (i = 0; i < iheight; i += ix) {
      temp_re = y[i + iy].re;
      temp_im = y[i + iy].im;
      y[i + iy].re = y[i].re - temp_re;
      y[i + iy].im = y[i].im - temp_im;
      y[i].re += temp_re;
      y[i].im += temp_im;
    }

    istart = 1;
    for (j = ju; j < 512; j += ju) {
      twid_re = costab[j];
      twid_im = sintab[j];
      i = istart;
      ihi = istart + iheight;
      while (i < ihi) {
        temp_re = twid_re * y[i + iy].re - twid_im * y[i + iy].im;
        temp_im = twid_re * y[i + iy].im + twid_im * y[i + iy].re;
        y[i + iy].re = y[i].re - temp_re;
        y[i + iy].im = y[i].im - temp_im;
        y[i].re += temp_re;
        y[i].im += temp_im;
        i += ix;
      }

      istart++;
    }

    ju /= 2;
    iy = ix;
    ix += ix;
    iheight -= iy;
  }
}

static double rt_hypotd(double u0, double u1)
{
  double y;
  double a;
  double b;
  a = fabs(u0);
  b = fabs(u1);
  if (a < b) {
    a /= b;
    y = b * sqrt(a * a + 1.0);
  } else if (a > b) {
    b /= a;
    y = a * sqrt(b * b + 1.0);
  } else {
    y = a * 1.4142135623730951;
  }

  return y;
}

static double sum(const double x[158])
{
  double y;
  int k;
  y = x[0];
  for (k = 0; k < 157; k++) {
    y += x[k + 1];
  }

  return y;
}

double zhang_definitivo(void)
{
  double classResult;
  int C4;
  static const double dv0[320] = { 0.0, 0.0196336924606283, 0.03925981575906861,
    0.05887080365118904, 0.078459095727844944, 0.0980171403295606,
    0.11753739745783766, 0.13701234168196802, 0.15643446504023087,
    0.17579627993435454, 0.19509032201612825, 0.21430915306505074,
    0.23344536385590542, 0.252491577015158, 0.27144044986507426,
    0.29028467725446233, 0.3090169943749474, 0.32763017956169355,
    0.346117057077493, 0.36447049987914965, 0.15307337294603593,
    0.16029953324125643, 0.16746389501497125, 0.17456369626933685,
    0.18159619989581874, 0.1885586947303991, 0.19544849659878202,
    0.20226294935119382, 0.20899942588637954, 0.21565532916440008,
    0.22222809320784087, 0.22871518409104491, 0.23511410091698925,
    0.24142237678142864, 0.24763757972393363, 0.25375731366545823,
    0.25977921933207354, 0.26570097516451269, 0.27152029821317669,
    0.27723494501825435, 0.282842712474619, 0.28834143868116752,
    0.29372900377427424, 0.29900333074503876, 0.30416238624001241,
    0.30920418134509475, 0.314126772352298, 0.31892826150908288,
    0.323606797749979, 0.32816057741020549, 0.33258784492101812,
    0.33688689348651468, 0.34105606574163694, 0.34509375439111678,
    0.34899840282911887, 0.35276850573934204, 0.35640260967534715,
    0.35989931362088862, 0.36325726953003251, 0.36647518284685443,
    0.36955181300451473, 0.37248597390352145, 0.37527653436899366,
    0.37792241858675124, 0.38042260651806142, 0.3827761342928836,
    0.384982094581459, 0.38703963694410393, 0.38894796815907068,
    0.390706352528349, 0.39231411216129219, 0.39377062723595668,
    0.39507533623805513, 0.3962277361774309, 0.39722738278197056,
    0.39807389066887877, 0.39876693349325121, 0.39930624407388637,
    0.3996916144962892, 0.39992289619282595, 0.4, 0.39992289619282595,
    0.3996916144962892, 0.39930624407388637, 0.39876693349325121,
    0.39807389066887877, 0.39722738278197056, 0.3962277361774309,
    0.39507533623805513, 0.39377062723595668, 0.39231411216129219,
    0.39070635252834895, 0.38894796815907068, 0.38703963694410393,
    0.38498209458145893, 0.38277613429288354, 0.38042260651806142,
    0.37792241858675124, 0.37527653436899366, 0.37248597390352145,
    0.36955181300451473, 0.36647518284685437, 0.36325726953003251,
    0.35989931362088856, 0.35640260967534709, 0.35276850573934204,
    0.34899840282911887, 0.34509375439111678, 0.34105606574163694,
    0.33688689348651463, 0.33258784492101806, 0.32816057741020543,
    0.323606797749979, 0.31892826150908288, 0.31412677235229797,
    0.30920418134509475, 0.30416238624001246, 0.29900333074503871,
    0.29372900377427419, 0.28834143868116746, 0.28284271247461906,
    0.27723494501825435, 0.27152029821317669, 0.26570097516451274,
    0.25977921933207354, 0.25375731366545823, 0.24763757972393355,
    0.2414223767814285, 0.23511410091698931, 0.22871518409104491,
    0.22222809320784087, 0.21565532916440003, 0.20899942588637943,
    0.20226294935119382, 0.19544849659878194, 0.188558694730399,
    0.1815961998958186, 0.17456369626933685, 0.16746389501497119,
    0.16029953324125631, 0.15307337294603579, 0.1457881999516597,
    0.13844682283099716, 0.13105207182467735, 0.12360679774997885,
    0.11611387090178496, 0.10857617994602985, 0.10099663080606328,
    0.09337814554236222, 0.0857236612260203, 0.078036128806451277,
    0.070318511973741893, 0.0625737860160924, 0.05480493667278722,
    0.04701495898313502, 0.039206856131824161, 0.031383638291138029,
    0.02354832146047562, 0.015703926303627404, 0.0078534769842512377,
    4.8985871965894131E-17, -0.0078534769842513157, -0.015703926303627484,
    -0.023548321460475696, -0.031383638291138105, -0.039206856131824237,
    -0.0470149589831351, -0.0548049366727873, -0.062573786016092467,
    -0.070318511973741976, -0.19509032201612836, -0.21430915306505094,
    -0.23344536385590572, -0.25249157701515834, -0.27144044986507476,
    -0.29028467725446211, -0.30901699437494728, -0.32763017956169349,
    -0.34611705707749263, -0.36447049987914942, -0.38268343236508967,
    -0.40074883310314091, -0.41865973753742819, -0.43640924067334186,
    -0.45399049973954669, -0.47139673682599764, -0.488621241496955,
    -0.50565737337798478, -0.52249856471594869, -0.53913832291100017,
    -0.55557023301960229, -0.57178796022761247, -0.58778525229247336,
    -0.60355594195357143, -0.61909394930983408, -0.6343932841636456,
    -0.64944804833018388, -0.66425243791128208, -0.67880074553294178,
    -0.693087362545636, -0.70710678118654768, -0.720853596702919,
    -0.73432250943568556, -0.74750832686259694, -0.76040596560003115,
    -0.77301045336273722, -0.78531693088074528, -0.79732065377270755,
    -0.8090169943749479, -0.820401443525514, -0.83146961230254524,
    -0.84221723371628665, -0.8526401643540924, -0.86273438597779206,
    -0.8724960070727974, -0.88192126434835494, -0.89100652418836779,
    -0.8997482840522214, -0.90814317382508136, -0.916187957117136,
    -0.92387953251128685, -0.93121493475880368, -0.93819133592248427,
    -0.94480604646687794, -0.95105651629515353, -0.95694033573220882,
    -0.96245523645364728, -0.96759909236025987, -0.97236992039767667,
    -0.9767658813208725, -0.98078528040323054, -0.98442656808989171,
    -0.98768834059513766, -0.99056934044357725, -0.99306845695492629,
    -0.99518472667219693, -0.996917333733128, -0.99826561018471582,
    -0.9992290362407229, -0.99980724048206482, -1.0, -0.99980724048206482,
    -0.9992290362407229, -0.99826561018471593, -0.996917333733128,
    -0.99518472667219682, -0.99306845695492629, -0.99056934044357725,
    -0.98768834059513777, -0.98442656808989171, -0.98078528040323043,
    -0.97676588132087239, -0.97236992039767656, -0.96759909236025965,
    -0.96245523645364717, -0.95694033573220894, -0.95105651629515364,
    -0.944806046466878, -0.93819133592248416, -0.93121493475880357,
    -0.92387953251128663, -0.91618795711713574, -0.90814317382508114,
    -0.89974828405222118, -0.89100652418836757, -0.881921264348355,
    -0.87249600707279706, -0.86273438597779173, -0.85264016435409207,
    -0.84221723371628632, -0.831469612302545, -0.82040144352551325,
    -0.809016994374947, -0.79732065377270667, -0.785316930880745,
    -0.77301045336273688, -0.76040596560003082, -0.74750832686259661,
    -0.73432250943568522, -0.72085359670291838, -0.707106781186547,
    -0.6930873625456353, -0.67880074553294112, -0.664252437911281,
    -0.64944804833018344, -0.63439328416364527, -0.61909394930983364,
    -0.603555941953571, -0.58778525229247258, -0.57178796022761158,
    -0.55557023301960218, -0.539138322911001, -0.52249856471594947,
    -0.50565737337798511, -0.48862124149695535, -0.47139673682599792,
    -0.45399049973954697, -0.43640924067334219, -0.41865973753742808,
    -0.40074883310314086, -0.38268343236508956, -0.3644704998791502,
    -0.34611705707749341, -0.32763017956169382, -0.30901699437494762,
    -0.2902846772544625, -0.27144044986507426, -0.25249157701515784,
    -0.2334453638559052, -0.21430915306505044, -0.19509032201612786,
    -0.17579627993435484, -0.15643446504023112, -0.13701234168196816,
    -0.11753739745783766, -0.0980171403295605, -0.078459095727844749,
    -0.05887080365118872, -0.039259815759068187, -0.01963369246062777 };

  static creal_T vnk[320];
  double C1;
  static dspcodegen_ZeroCrossingDetector zcd;
  unsigned long RN;
  static double dv1[158];
  static double dv2[158];
  double lhd;
  double thd;
  int C5;
  static double dv3[4];
  double dv4[4];
  C4 = 0;
  fft(dv0, vnk);
  C1 = 1.4142135623730951 * rt_hypotd(vnk[1].re, vnk[1].im) / 320.0 /
    0.70710678118654746;
  zcd.isInitialized = 0L;
  zcd.matlabCodegenIsDeleted = false;
  RN = SystemCore_step(&zcd);
  b_abs(*(creal_T (*)[158])&vnk[2], dv1);
  power(dv1, dv2);
  lhd = sum(dv2);
  b_sqrt(&lhd);
  thd = lhd / rt_hypotd(vnk[1].re, vnk[1].im);
  if (thd > 0.05) {
    C4 = 1;
  }

  C5 = 0;
  c_abs(*(creal_T (*)[4])&vnk[2], dv3);
  b_power(dv3, dv4);
  lhd = b_sum(dv4);
  b_sqrt(&lhd);
  lhd /= rt_hypotd(vnk[1].re, vnk[1].im);
  if ((lhd > 0.07) && (lhd >= thd - lhd)) {
    C5 = 1;
  }

  if ((!any(1.01 < C1)) && (!any(0.99 > C1)) && (!b_any(C4))) {
    classResult = 1.0;
  } else if (RN >= 3UL) {
    classResult = 10.0;
  } else if ((!b_any(C5)) && (!any(0.91 > C1)) && (!any(1.09 < C1))) {
    classResult = 6.0;
  } else {
    classResult = 7.0;
  }

  c_matlabCodegenHandle_matlabCod(&zcd);
  return classResult;
}
