NAG Library Function Document
nag_dpotrf (f07fdc) computes the Cholesky factorization of a real symmetric positive definite matrix.
||nag_dpotrf (Nag_OrderType order,
nag_dpotrf (f07fdc) forms the Cholesky factorization of a real symmetric positive definite matrix either as if or if , where is an upper triangular matrix and is lower triangular.
Demmel J W (1989) On floating-point errors in Cholesky LAPACK Working Note No. 14 University of Tennessee, Knoxville
Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore
order – Nag_OrderTypeInput
: 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 184.108.40.206
in the Essential Introduction for a more detailed explanation of the use of this argument.
uplo – Nag_UploTypeInput
: specifies whether the upper or lower triangular part of
is stored and how
is to be factorized.
- The upper triangular part of is stored and is factorized as , where is upper triangular.
- The lower triangular part of is stored and is factorized as , where is lower triangular.
n – IntegerInput
On entry: , the order of the matrix .
a – doubleInput/Output
the dimension, dim
, of the array a
must be at least
symmetric positive definite matrix
If , is stored in .
If , is stored in .
If , the upper triangular part of must be stored and the elements of the array below the diagonal are not referenced.
If , the lower triangular part of must be stored and the elements of the array above the diagonal are not referenced.
: the upper or lower triangle of
is overwritten by the Cholesky factor
as specified by uplo
pda – IntegerInput
: the stride separating row or column elements (depending on the value of order
) of the matrix
in the array
fail – NagError *Input/Output
The NAG error argument (see Section 3.6
in the Essential Introduction).
6 Error Indicators and Warnings
On entry, argument had an illegal value.
On entry, .
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
The leading minor of order
is not positive definite and the factorization could not be completed. Hence
itself is not positive definite. This may indicate an error in forming the matrix
. To factorize a
matrix which is not positive definite, call
, the computed factor
is the exact factor of a perturbed matrix
is a modest linear function of
is the machine precision
, a similar statement holds for the computed factor
. It follows that
8 Parallelism and Performance
nag_dpotrf (f07fdc) is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
nag_dpotrf (f07fdc) 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.
Please consult the Users' Note
for your implementation for any additional implementation-specific information.
The total number of floating-point operations is approximately .
A call to nag_dpotrf (f07fdc) may be followed by calls to the functions:
The complex analogue of this function is nag_zpotrf (f07frc)
This example computes the Cholesky factorization of the matrix
10.1 Program Text
Program Text (f07fdce.c)
10.2 Program Data
Program Data (f07fdce.d)
10.3 Program Results
Program Results (f07fdce.r)