Computes the roots of the polynomial with real coefficients.

p(x) = {\rm coef}[n] \times x^n + {\rm coef}[n-1] \times x^{n-1} + \ldots + {\rm coef}[0]

Namespace: Imsl.Math
Assembly: ImslCS (in ImslCS.dll) Version: 6.5.0.0

Syntax

C#
public Complex[] ComputeRoots(
	double[] coef
)
Visual Basic (Declaration)
Public Function ComputeRoots ( _
	coef As Double() _
) As Complex()
Visual C++
public:
array<Complex>^ ComputeRoots(
	array<double>^ coef
)

Parameters

coef
Type: array< System..::.Double >[]()[]
A double array containing the polynomial coefficients.

Return Value

A Complex array containing the roots of the polynomial.

Exceptions

ExceptionCondition
Imsl.Math..::.DidNotConvergeException is thrown if the iteration did not converge.

See Also