Private Sub HyperGeometricRandomTest() ' Test the HyperGeometricRandom function. Const lngTrials = 10 Const lngTries = 25000 Dim alngRes(0 To lngTrials) As Long Dim lngCur As Long For lngCur = 1 To lngTries Dim lngTmp As Long lngTmp = HyperGeometricRandom(lngTrials, 10, 20) alngRes(lngTmp) = alngRes(lngTmp) + 1& If lngCur Mod 2500& = 0& Then Debug.Print Now & " " & lngCur Next lngCur For lngCur = 0 To lngTrials Debug.Print lngCur, alngRes(lngCur) Next lngCur End Sub
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.