ГОСТ Р ИСО/МЭК 10373-6—2015
Е.9.2 fftrm.h
/*« » .**.Ь
/‘Tills is the header lile lor fftrm.c
^♦**»«**»«**»«**»«**»«**»«**»«**»«**»«**»«**»«**»»*»***»*«**»»*»***,
♦ifndef FFTRMH
Adeline FFTRM_H
2
•define RE(z) <(z).i)
♦define IM() (<
2
).i)
Lypedef float real;
typedef double doublere.il;
typedef struct l real r, i; }complex;
typedef struct fdoublereal r, L; |doublecomplex;
ln t
2ff*.
s (int debug, doublecomplex
*X,
m t
M);
int
2 irit.s (lnL debug, doublecomplex
*X,
ln t M);
void 2fftrm c|douolecom plex
*X, lnt M,
lnt.
P,
float.
Г);
void rmpo U n t *rv , in t *rvp j ;
♦endif
E.9.3 fftrm.c
/•fftrm.c */
/•This code contains the necessary function for Fourier and */
/‘inverse Fourier transformat.ion*/
^*****%%**%%**%%**%%**%%**%%**%%**%******-**%***%***1»#*****#********/
♦ i n c lu d e < S t d i o . h >
♦Include <(Cath.h>
♦i n c l u d e < m a llo C .h >
♦Include ’’fftrm.h"
♦ifndef M_PI
♦defineМ РГ 3.141Ь926b3569793236462643383279b
♦endif
float ‘WR;
float *WI;
doublereai *DMR;
doublereal *DWI;
void rmpoi lnt *rv, int *rvp )
t
int valueh;
int n;
n - 1;
•rvp - -
1
;
vaiue_h - 1;
while (value_h > 0 >
<
value_h - *rv - n;
(*rvp)♦
n *- n;
l
51