Lambert W functions on WP 34s « Next Oldest | Next Newest »

 ▼ Hans Milton Junior Member Posts: 3 Threads: 1 Joined: Nov 2011 11-25-2011, 09:00 AM It is impressive to see the Lambert W functions included in WP 34s. However, the W-1 function give incorrect results. Example: x ex = -0.2 has two solutions -0.259171 -2.542641 On the emulator W(-0.2) correctly returns the first solution. But W-1(-0.2), which is expected to give the second solution, instead returns -0.163746 ▼ Walter B Posting Freak Posts: 4,587 Threads: 105 Joined: Jul 2005 11-25-2011, 09:26 AM FYI, W^-1 represents the inverse of W in the WP 34S. ▼ Hans Milton Junior Member Posts: 3 Threads: 1 Joined: Nov 2011 11-25-2011, 10:10 AM I see. What I thought was the Lambert W-1 function is actually the inverse of the Lambert W0 function. Whichcould also be easily calculated as x ex. W-1 is not so easily calculated. So would be more usefulto have on the calc. ▼ Walter B Posting Freak Posts: 4,587 Threads: 105 Joined: Jul 2005 11-26-2011, 04:57 AM With the next software build, you'll find both branches on the WP 34S: Wp for the principal branch and Wm=W-1 for the lower branch. The latter is calculated by an XROM routine, so it may not be as accurate as Wp. ▼ Hans Milton Junior Member Posts: 3 Threads: 1 Joined: Nov 2011 11-26-2011, 08:14 AM Great! Gerson W. Barbosa Posting Freak Posts: 2,761 Threads: 100 Joined: Jul 2005 11-25-2011, 10:15 AM Easily done on the HP-12C: ```01 CHS 02 1/x 03 STO 0 04 STO 1 05 LN 06 RCL 0 07 * 08 RCL 1 09 x<>y 10 - 11 x=0 12 GTO 15 13 LST x 14 GTO 04 15 LST x 16 RCL 0 17 / 18 CHS 19 GTO 00 -0.2 R/S -> -2.542641358 ``` http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/archv019.cgi?read=159032 Edited: 25 Nov 2011, 10:54 a.m. ▼ Paul Dale Posting Freak Posts: 3,229 Threads: 42 Joined: Jul 2006 11-25-2011, 06:52 PM It would be easy enough to include a user code programme to calculate this branch of the W function in the device -- for real arguments only. I'd guess 100 or so bytes of precious flash. Alternatively, use this program: ``` 01 LBL'W[sub-1]' 02 LocR 02 03 STO .02 04 +/- 05 1/x 06 STO .00 07 STO .01 08 LN 09 RCL[times] .00 10 RCL .01 11 x[<->] Y 12 - 13 x=0? 14 SKIP 03 15 DROP 16 RCL L 17 BACK 10 18 DROP 19 RCL L 20 RCL/ .00 21 +/- 22 x[<->] .02 23 STO L 24 x[<->] .02 25 RTN ``` Store it in one of the flash segments and you've got the W-1 function. It behaves like a keyboard command in that Last X is set properly and the stack is not damaged. The argument range is not correctly validated however. - Pauli ▼ Walter B Posting Freak Posts: 4,587 Threads: 105 Joined: Jul 2005 11-25-2011, 06:59 PM Pauli, [sub-1] ?? ▼ Paul Dale Posting Freak Posts: 3,229 Threads: 42 Joined: Jul 2006 11-25-2011, 07:30 PM Yeah, [sub-1] which displays as 1. We don't have a subscript minus or minus 1. All our codes for subscripts are [sub-X]. The other convention I've seen is Wm and Wp for w-1 and W0 respectively. - Pauli ▼ Walter B Posting Freak Posts: 4,587 Threads: 105 Joined: Jul 2005 11-26-2011, 03:20 AM Exactly. And we feature [sub-m] and [sub-p] ... :-) ▼ Paul Dale Posting Freak Posts: 3,229 Threads: 42 Joined: Jul 2006 11-26-2011, 03:27 AM I know that was why I mentioned them ;-) - Pauli Ángel Martin Posting Freak Posts: 1,253 Threads: 117 Joined: Nov 2005 11-25-2011, 10:49 AM Just in case it's useful, functions WL1 and WL0 are available in the SandMath-II module for the HP-41, both implemented in MCODE. The module is available at TOS for V41 and i41CX usage - also possible to burn into Clonix, MLDL2k, etc. of course. Cheers, ÁM Edited: 25 Nov 2011, 10:49 a.m.

 Possibly Related Threads... Thread Author Replies Views Last Post [WP-34S] Unfortunate key damage with update to V3 :( svisvanatha 5 2,566 12-10-2013, 11:37 PM Last Post: Les Bell WP-34S (Emulator Program Load/Save) Barry Mead 1 1,378 12-09-2013, 05:29 PM Last Post: Marcus von Cube, Germany DIY HP 30b WP 34s serial flash/programming cable Richard Wahl 2 2,021 12-04-2013, 11:14 AM Last Post: Barry Mead WP 34S/43 ?'s Richard Berler 3 1,652 11-10-2013, 02:27 AM Last Post: Walter B My FrankenCulator (wp-34s) FORTIN Pascal 4 1,732 11-09-2013, 06:18 PM Last Post: FORTIN Pascal WP 34S Owner's Handbook Walter B 5 2,182 11-09-2013, 05:34 PM Last Post: Harald [41CL] New Extra Functions version Monte Dalrymple 0 898 11-08-2013, 04:32 PM Last Post: Monte Dalrymple wp 34s overlay and programming. FORTIN Pascal 6 2,375 11-08-2013, 01:28 PM Last Post: Nick_S m.dy in display of WP-34S Harold A Climer 3 1,561 11-05-2013, 11:28 AM Last Post: Andrew Nikitin WP 34s : An old problem coming back Miguel Toro 2 1,386 11-05-2013, 03:00 AM Last Post: Marcus von Cube, Germany

Forum Jump: