The following program displays the Cholesky square root of the matrix as well as the rank of the matrix and the square root of its determinant.
Module MainModule
Sub Main()
Dim arand As New AMOSRANDOMLib6.AmosRanGen
Dim Cov(2) As Double
Cov(0) = 3
Cov(1) = 1
Cov(2) = 2
Dim Rank As Integer
Dim sqrdet As Double
Call arand.InstantSqrt(2, Cov(0), Rank, sqrdet)
Dim ad As New AmosDebug.AmosDebug
Call ad.PrintTriangle(Cov, "Square root of matrix")
Call ad.PrintX(Rank, "Rank")
Call ad.PrintX(sqrdet, "Square root of determinant")
End Sub
End Module