The routine may be called by the names f03bnf or nagf_det_complex_gen.
f03bnf computes the determinant of a complex matrix that has been factorized by a call to f07arf. The determinant of is the product of the diagonal elements of with the correct sign determined by the row interchanges.
Wilkinson J H and Reinsch C (1971) Handbook for Automatic Computation II, Linear Algebra Springer–Verlag
1: – IntegerInput
On entry: , the order of the matrix .
2: – Complex (Kind=nag_wp) arrayInput
Note: the second dimension of the array a
must be at least
On entry: the matrix in factorized form as returned by f07arf.
3: – IntegerInput
On entry: the first dimension of the array a as declared in the (sub)program from which f03bnf is called.
4: – Integer arrayInput
On entry: the row interchanges used to factorize matrix as returned by f07arf.
5: – Complex (Kind=nag_wp)Output
On exit: the mantissa of the real and imaginary parts of the determinant.
6: – Integer arrayOutput
On exit: the exponents for the real and imaginary parts of the determinant. The determinant, , is returned as and , where and and are stored in the first and second elements respectively of the array id on successful exit.
7: – IntegerInput/Output
On entry: ifail must be set to , or to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of means that an error message is printed while a value of means that it is not.
If halting is not appropriate, the value or is recommended. If message printing is undesirable, then the value is recommended. Otherwise, the value is recommended. When the value or is used it is essential to test the value of ifail on exit.
On exit: unless the routine detects an error or a warning has been flagged (see Section 6).
6Error Indicators and Warnings
If on entry or , explanatory error messages are output on the current error message unit (as defined by x04aaf).
Errors or warnings detected by the routine:
On entry, .
On entry, and .
The matrix is approximately singular.
An unexpected error has been triggered by this routine. Please
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library FL Interface for further information.
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.
The accuracy of the determinant depends on the conditioning of the original matrix. For a detailed error analysis, see page 107 of Wilkinson and Reinsch (1971).
8Parallelism and Performance
Background information to multithreading can be found in the Multithreading documentation.
f03bnf is not threaded in any implementation.
The time taken by f03bnf is approximately proportional to .
This example calculates the determinant of the complex matrix