<-- Previous || Up || Next -->

Random Double Test Sub
Math Probability Class

Private Sub RandomDoubleTest()
    'Test the RandomDouble function.

    Const lngTries = 20000000

    Dim dblMin#, dblMax#, lngCur&, dblTmp#

    dblMin = RandomDouble
    dblMax = dblMin

    Debug.Print Now
    For lngCur = 1 To lngTries
        dblTmp = RandomDouble
        If dblTmp < dblMin Then dblMin = dblTmp
        If dblTmp > dblMax Then dblMax = dblTmp
        If lngCur Mod 10000000 = 0& Then Debug.Print Now, Format$(lngCur, "#,##0")
    Next lngCur
    
    Debug.Print "Min: " & dblMin
    Debug.Print "Max: " & dblMax
End Sub

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.