The following program sets CholeskyEpsilon to 1.0e-15. Then it 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
arand.CholeskyEpsilon = 0.0000000001
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