nag_matop_complex_gen_matrix_log (f01fjc) computes the principal matrix logarithm, , of a complex by matrix , with no eigenvalues on the closed negative real line.
is computed using the Schur–Parlett algorithm for the matrix logarithm described in
Higham (2008) and
Davies and Higham (2003).
Davies P I and Higham N J (2003) A Schur–Parlett algorithm for computing matrix functions. SIAM J. Matrix Anal. Appl. 25(2) 464–485
- NE_ALLOC_FAIL
Allocation of memory failed. The Complex allocatable memory required is approximately .
- NE_BAD_PARAM
On entry, argument had an illegal value.
- NE_EIGENVALUES
was found to have eigenvalues on the closed, negative real line. The principal logarithm cannot be calculated in this case.
- NE_INT
On entry, .
Constraint: .
- NE_INT_2
On entry, and .
Constraint: .
- NE_INTERNAL_ERROR
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact
NAG for assistance.
An unexpected internal error occured when ordering the eigenvalues of
. Please contact
NAG.
Computation of the square root of a submatrix failed.
Note: this failure should not occur and suggests that the function has been called incorrectly.
The function was unable to compute the Schur decomposition of .
Note: this failure should not occur and suggests that the function has been called incorrectly.
There was an error whilst reordering the Schur form of .
Note: this failure should not occur and suggests that the function has been called incorrectly.
There was a problem obtaining the weights and nodes from the Gaussian quadrature function
nag_quad_1d_gauss_wgen (d01tcc). This failure should not occur,
nag_quad_1d_gauss_wgen (d01tcc) returns
; please send this information to
NAG for further advice.
- NE_SINGULAR
The linear equations to be solved are nearly singular and the Padé approximant may have no correct figures.
Note: this failure should not occur and suggests that the function has been called incorrectly.
For a normal matrix
(for which
), the Schur decomposition is diagonal and the algorithm reduces to evaluating the logarithm of the eigenvalues of
and then constructing
using the Schur vectors. See Section 9.4 of
Higham (2008) for details and further discussion.
For discussion of the condition of the matrix logarithm see Section 11.2 of
Higham (2008) floating-point operations.
The cost of the algorithm is
. The exact cost depends on the eigenvalue distribution of
; see Algorithm 11.11 of
Higham (2008).
nag_matop_real_gen_matrix_log (f01ejc) can be used to find the principal logarithm of a real matrix.
This example finds the principal matrix logarithm of the matrix