Sub Ex_Zpotrf()
Const N As Long = 3
Dim A(N - 1, N - 1) As Complex, B(N - 1) As Complex
Dim ANorm As Double, RCond As Double, Info As Long
A(0, 0) = Cmplx(2.2, 0)
A(1, 0) = Cmplx(-0.11, -0.93): A(1, 1) = Cmplx(2.32, 0)
A(2, 0) = Cmplx(0.81, 0.37): A(2, 1) = Cmplx(-0.8, -0.92): A(2, 2) = Cmplx(2.29, 0)
B(0) = Cmplx(1.598, 1.4644): B(1) = Cmplx(1.3498, 1.4398): B(2) = Cmplx(2.0561, -0.5441)
ANorm = Zlanhe("1", "L", N, A())
Call
Zpotrf("L", N, A(), Info)
If Info = 0 Then Call Zpotrs("L", N, A(), B(), Info)
If Info = 0 Then Call Zpocon("L", N, A(), ANorm, RCond, Info)
Debug.Print "X =",
Debug.Print Creal(B(0)), Cimag(B(0)), Creal(B(1)), Cimag(B(1)), Creal(B(2)), Cimag(B(2))
Debug.Print "RCond =", RCond
Debug.Print "Info =", Info
End Sub
Sub Zpotrf(Uplo As String, N As Long, A() As Complex, Info As Long)
Cholesky factorization of a Hermitian positive definite matrix