package com.imsl.test.example.math; import com.imsl.math.*; /** *

* Finds the zeros of a polynomial.

* * The zeros of a polynomial with real coefficients are computed. * * @see Code * @see Output */ public class ZeroPolynomialEx1 { public static void main(String args[]) throws ZeroPolynomial.DidNotConvergeException { double coef[] = {-2, 4, -3, 1}; ZeroPolynomial zp = new ZeroPolynomial(); Complex root[] = zp.computeRoots(coef); for (int k = 0; k < root.length; k++) { System.out.println("root = " + root[k]); System.out.println(" radius = " + zp.getRadius(k)); System.out.println(" status = " + zp.getStatus(k)); } } }