|
NAG[f07tjc] NAG[nag_dtrtri] - Inverse of real triangular matrix
|
|
Calling Sequence
f07tjc(uplo, diag, a, 'n'=n, 'fail'=fail)
nag_dtrtri(. . .)
Parameters
|
uplo - String;
|
|
|
On entry: indicates whether is upper or lower triangular.
|
|
is upper triangular.
|
|
is lower triangular.
|
|
Constraint: "Nag_Upper" or "Nag_Lower". .
|
|
|
diag - String;
|
|
|
On entry: indicates whether is a non-unit or unit triangular matrix.
|
|
is a non-unit triangular matrix.
|
|
Constraint: "Nag_NonUnitDiag" or "Nag_UnitDiag". .
|
|
|
a - Matrix(1..dim1, 1..dim2, datatype=float[8], order=order);
|
|
|
Note: this array may be supplied in Fortran_order or C_order , as specified by order. All array parameters must use a consistent order.
|
|
If , is upper triangular and the elements of the array below the diagonal are not referenced.
|
|
If , is lower triangular and the elements of the array above the diagonal are not referenced.
|
|
On exit: is overwritten by , using the same storage format as described above.
|
|
|
'n'=n - integer; (optional)
|
|
|
Default value: the dimension of the array a.
|
|
On entry: , the order of the matrix .
|
|
Constraint: . .
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Purpose
|
|
nag_dtrtri (f07tjc) computes the inverse of a real triangular matrix.
|
|
Description
|
|
nag_dtrtri (f07tjc) forms the inverse of a real triangular matrix . Note that the inverse of an upper (lower) triangular matrix is also upper (lower) triangular.
|
|
Error Indicators and Warnings
|
|
"NE_BAD_PARAM"
On entry, argument had an illegal value.
"NE_INT"
On entry, . 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 consult NAG for assistance.
"NE_SINGULAR"
is zero, and the matrix is singular.
|
|
Accuracy
|
|
The computed inverse satisfies
where is a modest linear function of , and is the machine precision.
Note that a similar bound for cannot be guaranteed, although it is almost always satisfied.
The computed inverse satisfies the forward error bound
See Du Croz and Higham (1992).
|
|
Further Comments
|
|
The total number of floating-point operations is approximately .
The complex analogue of this function is f07twc (nag_ztrtri).
|
|
|
Examples
|
|
>
|
uplo := "Nag_Lower":
diag := "Nag_NonUnitDiag":
n := 4:
a := Matrix([[4.3, 0, 0, 0], [-3.96, -4.87, 0, 0], [0.4, 0.31, -8.02, 0], [-0.27, 0.07000000000000001, -5.95, 0.12]], datatype=float[8], order='C_order'):
NAG:-f07tjc(uplo, diag, a, 'n' = n):
|
|
|