Skip to content
HP-41: This program calculates the W Lambert function
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


HP-41: This program calculates the W Lambert function

The program originated from over at the HP Forum, were I sought a solution to the equation "b=(a^x)/x" solved for x. This cannot be done without resorting to the W Lambert function.

Thomas Klemm and Gerson W. Barbosa offered solutions to the W function as HP-41 programs. I simply merged the programs into one. Subsequently, Gerson embarked upon a quest to enhance the program, enticing Dieter and others on the HP Forum to contribute. I added a simple interface to Dieter’s final take.

Example of usage:

The closed form solution to the equation b=(a^x)/x is

alt text

In order to solve it for x, we will use the program this way:

STO 02
    You will see the short menu "WP WM" corresponding
    to the labels "A" and "B" in the top row keys.

    Press the USER key (if you haven't done so yet) then
A   (or B for the second real solution, in case there is one)

RCL 02

For instance, for a = 2 and b = 3 you should get

x1 = 0.457822373 (WP)


x2 = 3.313178379 (WM)

The valid limits for WP and WM are:

-1/e <= x <= +inf (WP)

-1/e <= x < 0 (WM)


This software is released into the Public Domain.

You can’t perform that action at this time.