ГОСТ Р 56047—2014
denoma = 0;
denomb =
0
;
for(k=0;k<p;k++) {
num += F0{k) * F0[i+k);
denoma += p(F0[kJ, 2.0);
denomb += p(F0[i+k], 2.0);
)
hannwin(i) = 0.5’sqrt((doubie>8.0/3.0)*{1.0 - cos({double)2.0
•M_PI*i’(p-1.0)));
C[i] = num / (sqrt((doub!e)denoma) * sqrt((double)denomb));
Ш tdefined(AVGHANN)
C[i] *= hannv/in[i];
#endif
Csum += C[i];
}
for(i=0;i<p;i++) {
C[i] -= (double)Csum/p;
#tf defined(AVGHANN)
C[i] ’= hannwin(i);
#endif
inlij.im = 0;
infij.re = Cfi);
}
fftw_one(pdan2. in. out);
0
for(k=0;k<p/2;k++) {
out[kl.re *= (double)(1.0/p):
out[kj.im *= (doubleХ1 . /p);
Cfft[k) = p(out[kJ.re. 2.0) + p(out(k].im. 2.0);
#ildef EHSMOD02
for(k=0;k<p/2;k++) {
Cffttmptk] += Cfft(kJ;
Cfft(k] = Cmtmp[kV(*n);
}
fcendif
M Idefined(GETMAX)
i = 0+PATCH;
while(1) {
if(Cfftli) >= Cfft(i+1]){
while(i < p/2-1 && Cfftfi) >= Cfft(i+1l)
i++:
if(i< p/2-1)
break;
else {
CnH
return 0;
}
)
else (
while(i < p/2-1 && Cfftp] <= Cfft(i+1J)
i++:
while(i < p/2-1 && Cfft[i] >= Cfftli+1])
i++;
if(i< p/2-1)
break;
else {
CnH
return 0;
75