c02amf attempts to find the roots of the cubic equation
where
,
,
and
are complex coefficients with
. The roots are located by finding the eigenvalues of the associated
(upper Hessenberg) companion matrix
given by
The eigenvalues are obtained by a call to
f08psf. Further details can be found in
Section 9.
To obtain the roots of a quadratic equation,
c02ahf can be used.
If on entry
or
, explanatory error messages are output on the current error message unit (as defined by
x04aaf).
Background information to multithreading can be found in the
Multithreading documentation.
Please consult the
X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the
Users' Note for your implementation for any additional implementation-specific information.
The method used by the routine consists of the following steps, which are performed by routines from LAPACK in
Chapter F08.
-
(a)Form matrix .
-
(b)Apply a diagonal similarity transformation to (to give ).
-
(c)Calculate the eigenvalues and Schur factorization of .
-
(d)Calculate the left and right eigenvectors of .
-
(e)Estimate reciprocal condition numbers for all the eigenvalues of .
-
(f)Calculate approximate error estimates for all the eigenvalues of (using the -norm).
Internal changes have been made to this routine as follows:
- At Mark 27.1: The algorithm used by this routine was adapted to make direct use of complex data.
For details of all known issues which have been reported for the NAG Library please refer to the
Known Issues.
This example finds the roots of the cubic equation