HP49-50G Lambert function
10-19-2020, 09:40 AM
Post: #5
 Gil Senior Member Posts: 379 Joined: Oct 2019
RE: HP49-50G Lambert function
As some characters were missing in the previous transcription, here is a new format of the exact identical code:

Always version 2

\<< "Lambert W(Z):
Having result Y
Y real in (-879.3 \oo)
or Z complex (a,b)
W(Z) finds / gives X
such that
(X * EXP X) = Z
W(X * EXP X) =X

" DROP \-> Y
\<<
IF Y TYPE 1. == NOT
THEN
IF Y -1. EXP NEG <
THEN Y 0. R\->C 'Y' STO
END
END
IFERR 'X' 'X' RCL
THEN
ELSE
END
IF Y TYPE 1. ==
THEN DUP2 SAME NOT
IF
THEN 'X' PURGE
END 'a*EXP(a)*COS(b)-b*EXP(a)*SIN(b)' Y OBJ\-> DROP = 'a*EXP(a)*SIN(b)+b*EXP(a)*COS(b)' Y C\->R SWAP DROP = 2. \->ARRY 'a' 'b' 2. \->ARRY [ 1. 1. ] MSLV OBJ\-> DROP R\->C UNROT DROP2
ELSE 'X*EXP(X)-Y' 'X' 1. ROOT
END UNROT DUP2 SAME
IF
THEN DROP2 'X' PURGE
ELSE SWAP STO
END "W(" Y + ")" + \->TAG
\>>
\>>

Regards,
Gil Campart
 « Next Oldest | Next Newest »

 Messages In This Thread HP49-50G Lambert function - Gil - 10-17-2020, 08:42 PM RE: HP49-50G Lambert function - Gil - 10-18-2020, 10:22 AM RE: HP49-50G Lambert function W(z) - Gil - 10-19-2020, 09:06 AM RE: HP49-50G Lambert function - Gil - 10-19-2020, 09:13 AM RE: HP49-50G Lambert function - Albert Chan - 10-20-2020, 01:48 AM RE: HP49-50G Lambert function - Gil - 10-19-2020 09:40 AM RE: HP49-50G Lambert function - Gil - 10-20-2020, 08:28 AM RE: HP49-50G Lambert function - Gil - 10-20-2020, 08:42 AM RE: HP49-50G Lambert function - Albert Chan - 10-20-2020, 04:40 PM RE: HP49-50G Lambert function - Gil - 10-20-2020, 10:44 PM RE: HP49-50G Lambert function - Albert Chan - 10-21-2020, 02:54 AM RE: HP49-50G Lambert function - Albert Chan - 10-21-2020, 12:13 PM RE: HP49-50G Lambert function - Gil - 10-21-2020, 11:44 AM

User(s) browsing this thread: 1 Guest(s)