NAG FL Interface
computes the inverse of a real triangular matrix, using packed storage. f07ujf
Fortran Interface copy
Integer, Intent (In)
Integer, Intent (Out)
Real (Kind=nag_wp), Intent (Inout)
Character (1), Intent (In)
The routine may be called by the names
f07ujf, nagf_lapacklin_dtptri or its LAPACK name dtptri.
forms the inverse of a real triangular matrix f07ujf , using packed storage. Note that the inverse of an upper (lower) triangular matrix is also upper (lower) triangular. A
Du Croz J J and Higham N J (1992) Stability of methods for matrix inversion
IMA J. Numer. Anal. 12 1–19
– Character(1) Input
: specifies whether
is upper or lower triangular.
uplo = 'U'
is upper triangular. A
uplo = 'L' is lower triangular. A
or uplo = 'U' . 'L'
– Character(1) Input
: indicates whether
is a nonunit or unit triangular matrix.
diag = 'N'
is a nonunit triangular matrix. A
diag = 'U' is a unit triangular matrix; the diagonal elements are not referenced and are assumed to be A . 1
or diag = 'N' . 'U'
– Integer Input
On entry: , the order of the matrix n . A
. n ≥ 0
ap ( * ) – Real (Kind=nag_wp) array Input/Output
the dimension of the array
must be at least
max ( 1 , n × ( n + 1 ) / 2 )
n × n
, packed by columns.
, the upper triangle of uplo = 'U' must be stored with element A in A i j for ap ( i + j ( j - 1 ) / 2 ) ; i ≤ j if , the lower triangle of uplo = 'L' must be stored with element A in A i j for ap ( i + ( 2 n - j ) ( j - 1 ) / 2 ) . i ≥ j
, the diagonal elements of diag = 'U' are assumed to be A , and are not referenced; the same storage scheme is used whether 1 or ‘U’. diag = 'N'
On exit: is overwritten by A , using the same storage format as described above. A - 1
– Integer Output
info = 0
unless the routine detects an error (see
Error Indicators and Warnings
info < 0
, argument info = - i had an illegal value. An explanatory message is output, and execution of the program is terminated. i
info > 0
of the diagonal is exactly zero.
⟨ value ⟩ is singular its inverse cannot be computed.
The computed inverse
c ( n )
is a modest linear function of
Note that a similar bound for
cannot be guaranteed, although it is almost always satisfied. | A X - I |
The computed inverse satisfies the forward error bound
| X - A - 1 | ≤ c ( n ) ε | A - 1 | | A |
| X | .
Du Croz and Higham (1992)
Parallelism and Performance
makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information. f07ujf
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
for your implementation for any additional implementation-specific information.
The total number of floating-point operations is approximately
. 1 3 n 3
The complex analogue of this routine is
This example computes the inverse of the matrix
0.12 ) ,
using packed storage.