Statistics
| Branch: | Revision:

root / synthbench / euroben-ports / base / C / mod2f / gendat.c @ 0:839f52ef7657

History | View | Annotate | Download (544 Bytes)

1
#include <math.h>
2

    
3
void gendat( double a[], int n )
4
// ---------------------------------------------------------------------
5
// --- Routine 'gendat' generates  Real part of the test data for
6
//      the FFT: One complete cosine cycle in the Real part of the data.
7
// ---------------------------------------------------------------------
8
{
9
   int    i;
10
   double fac;
11
// ---------------------------------------------------------------------
12
   fac = 8.0*atan( 1.0 )/(double)n;
13
   for( i = 0 ; i < n; i++ ) {
14
         a[i] = cos( i*fac );
15
   }
16
}