Added script front-end for primer-design code
[htsworkflow.git] / htswanalysis / MACS / lib / gsl / gsl-1.11 / doc / examples / polyroots.c
1 #include <stdio.h>
2 #include <gsl/gsl_poly.h>
3
4 int
5 main (void)
6 {
7   int i;
8   /* coefficients of P(x) =  -1 + x^5  */
9   double a[6] = { -1, 0, 0, 0, 0, 1 };  
10   double z[10];
11
12   gsl_poly_complex_workspace * w 
13       = gsl_poly_complex_workspace_alloc (6);
14   
15   gsl_poly_complex_solve (a, 6, w, z);
16
17   gsl_poly_complex_workspace_free (w);
18
19   for (i = 0; i < 5; i++)
20     {
21       printf ("z%d = %+.18f %+.18f\n", 
22               i, z[2*i], z[2*i+1]);
23     }
24
25   return 0;
26 }