Private Sub CubicRootBenchmark() ' Run a benchmark of the CubicRoot function. 'See also: ' CubicRoot Function ' QuadraticRootBenchmark Subroutine Dim lngMax As Long Dim lngTry As Long Dim varRtn As Variant lngMax = 64 Debug.Print "Count = " & lngMax Debug.Print "Cubic: "; DebugTimerOn For lngTry = 1 To lngMax Dim CA As Variant Dim CB As Variant Dim CC As Variant Dim CD As Variant CA = RealToComplex(Rnd * 6 - 3, Rnd * 6 - 3) CB = RealToComplex(Rnd * 6 - 3, Rnd * 6 - 3) CC = RealToComplex(Rnd * 6 - 3, Rnd * 6 - 3) CD = RealToComplex(Rnd * 6 - 3, Rnd * 6 - 3) varRtn = CubicRoot(CA, CB, CC, CD, 1) varRtn = CubicRoot(CA, CB, CC, CD, 2) varRtn = CubicRoot(CA, CB, CC, CD, 3) Next lngTry Debug.Print DebugTimerOff End Sub
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.