/* nag_zeros_complex_poly(c02afc) Example Program * * Copyright 1991 Numerical Algorithms Group. * * Mark 2, 1991. */ #include #include #include #include #define MAXDEG 100 int main(void) { Complex a[MAXDEG+1], z[MAXDEG]; Integer i, n; Boolean scale; Vprintf("c02afc Example Program Results\n"); /* Skip heading in data file */ Vscanf("%*[^\n]"); Vscanf("%ld", &n); scale = TRUE; if (n>0 && n<=MAXDEG) { for (i=0; i<=n; i++) Vscanf("%lf%lf", &a[i].re, &a[i].im); c02afc(n, a, scale, z, NAGERR_DEFAULT); Vprintf("\nDegree of polynomial = %4ld\n\n", n); Vprintf("Roots of polynomial\n\n"); for (i=0; i