/* Pieter Suurmond, 2006. C++ API for Laguerre's root finding method. Allows both the input (polynome coefficients) and the output (the roots) to be complex. IN: The degree of the input polynome. An array of complex coefficients. OUT: The actual degree of the polynome (high-degree-null-coeffs removed). An array of complex roots (with size 1 less than input array). Memory for the output array must be allocated by the caller? */ /* Returns zero in case of success. Returns a non-zero error number in case of failure. Coefficients must be supplied in ASCENDING order of degree! */ int find_roots(int num_coeffs, // Degree + 1. const complex* coeffs, // Input array, size=num_coeffs. int* num_roots, // Actual degree of the polynome. complex* roots); // Found roots are written here.