ProductLog
WilliamG wrote:
I have discovered that the solution to a problem I am trying to solve is: B
= A + ProductLog [-Ae^-A]. I know A and, obviously, e. Is there a formula I
can type into Excel that will give me the output B? Many thanks indeed for
any help you can offer.
Hi. Here's 1 idea for a vba function.
It does not have error checking. It's very basic.
It goes for 15 loops, and will not exit if it hits it's fixed point earlier.
Function ProductLog(n)
Dim g As Double
Dim j As Long
g = 1
For j = 1 To 15
g = (n * Exp(-g) + g ^ 2) / (1 + g)
Next j
ProductLog = g
End Function
HTH
Dana DeLouis
|