As for fibbonacci sequences a more correct function would be along
these lines:

(c) 2006 The Fool
' where fib(0) = 0

Function FibNum(Fib As Long) As Long
         If (Fib > 0) Then
            FibNum = FibPos((Fib - 1))
         Else '
              FibNum = FibNeg(Fib + 1)
         End If
End Function

Function FibPos(Fib As Long) As Long
         If (Fib < 2) Then
            FibPos = 1
         Else '
              FibPos = (FibPos(Fib - 2) + FibPos(Fib - 1))
         End If
End Function

Function FibNeg(Fib As Long) As Long
         If (Fib > 1) Then
            FibNeg = 1
         Else '
              FibNeg = (FibNeg(Fib + 2) - FibNeg(Fib + 1))
         End If
End Function


A poster at your weblog got it wrong:
------
...34/-21/13/-8/5/-3/2/-1/1/0/1/1/2/3/5/8/13/21/34...

_______________________________________________
http://www.mccmedia.com/mailman/listinfo/brin-l

Reply via email to