Funkce:
' Pokud je Φφslo zßpornΘ
nebo >170, vygeneruje chybu
' "subscript out of range"
Function Factorial(ByVal number As Long) As Double
Static result(170) As Double
If result(0) = 0 Then
Dim i As Long
result(0) = 1
' Factorial(170) je nejvyÜÜφ hodnota faktorißlu,
' kterß jde ulo₧it do
Double
For i = 1 To 170
result(i)
= result(i - 1) * i
Next
End If
Factorial = result(number)
End Function
Function
Log10(number As Double) As Double
Log10
= Log(number) / 2.30258509299405
End
Function
|