Sub Ex_Dsptri()
Const N = 3
Dim Ap(N * (N + 1) / 2) As Double, IPiv(N - 1) As Long, Info As Long
Ap(0) = 2.2
Ap(1) = -0.11: Ap(3) = 2.93
Ap(2) = -0.32: Ap(4) = 0.81: Ap(5) = 2.37:
Call Dsptrf("L", N, Ap(), IPiv(), Info)
If Info = 0 Then Call Dsptri("L", N, Ap(), IPiv(), Info)
Debug.Print "Inv(A) ="
Debug.Print Ap(0)
Debug.Print Ap(1), Ap(3)
Debug.Print Ap(2), Ap(4), Ap(5)
Debug.Print "Info =", Info
End Sub