The function may be called by the names: f03bac or nag_det_real_gen.
f03bac computes the determinant of a real matrix that has been factorized by a call to f07adc. 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: – Nag_OrderTypeInput
On entry: the order argument specifies the two-dimensional storage scheme being used, i.e., row-major ordering or column-major ordering. C language defined storage is specified by . See Section 3.1.3 in the Introduction to the NAG Library CL Interface for a more detailed explanation of the use of this argument.
2: – IntegerInput
On entry: , the order of the matrix .
3: – const doubleInput
Note: the dimension, dim, of the array a
must be at least
the th element of the factorized form of the matrix is stored in
On entry: the matrix in factorized form as returned by f07adc.
4: – IntegerInput
On entry: the stride separating row or column elements (depending on the value of order) in the array a.
5: – const IntegerInput
On entry: the row interchanges used to factorize matrix as returned by f07adc.
6: – double *Output
7: – Integer *Output
On exit: the determinant of is given by . It is given in this form to avoid overflow or underflow.
8: – NagError *Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).
6Error Indicators and Warnings
Dynamic memory allocation failed.
See Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
On entry, argument had an illegal value.
On entry, .
On entry, and .
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.
See Section 7.5 in the Introduction to the NAG Library CL 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 CL Interface for further information.
The matrix is approximately singular.
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
f03bac is not threaded in any implementation.
The time taken by f03bac is approximately proportional to .
This example computes the factorization with partial pivoting, and calculates the determinant, of the real matrix