Post Reply 
Lambert W function (for HP Prime)
08-25-2022, 03:17 AM (This post was last modified: 08-25-2022 12:42 PM by Bill Triplett.)
Post: #18
RE: Lambert W function (for HP Prime)
When calculating values for Lambert Omega, the HP Prime can handle big numbers. For older calculators such as the HP-42S, the ancient little shirt-pocket machines were surprisingly capable.

The number of smallest subatomic particles in the observable universe is approximately 3.3x10^80. Using Lyuka's LW0C program on the Prime, we see:

LW0C(3.3E80) = 180.2

Also,

LW0C(1.797693E308) = 708.59221

This is the maximum. If we make the x input for Lyuka's LW0C program just a tiny bit larger, the result becomes undefined. If we keep perspective, and consider the size of the universe, this is not really a limit.

I polished up one of Albert Chan's Lambert Omega functions for the HP-42S. My physical machine calculates W(9.99999999999E499) = 1,144.25. No larger input is allowed.

When using the Free42 simulator, the little beast allows us to type in exponents up to 999. It can do this:

W(999,999,999,999,999E999) = 2,327.06892

We can't physically type in exponents bigger than three digits when entering a value for x, but I have an idea. Assume we have a Lambert Omega function stored in a program named "cW" in the HP-42S catalog. We can type this:

Shift
GTO
cW
999,999,999,999,999E999
ENTER
*

At this point after we hit the multiply button (*), the x register contains 1.0E2028. This is the original big number multiplied by itself.

Now, press R/S.

Mr. Chan's code calculates cW(1.0E2028) = 4661.19.

"Out of this world?" Nope. It is more like, "out of this universe."

I have no idea how far the simulated HP-42S can go.

Here is the HP-42S program I used for calculating the Lambert Omega relation values based on Mr. Chan's code:

Code:
00 { 64-Byte Prgm }
01▸LBL "cW"
02 0.3
03 -1
04 E^X
05 RCL+ ST Z
06 STO× ST Y
07 STO+ ST X
08 LASTX
09 STO+ ST Z
10 ×
11 SQRT
12 +
13 X<>Y
14 +/-
15 X<>Y
16▸LBL 01
17 X=Y?
18 GTO 02
19 STO ST Y
20 LN
21 1
22 +
23 R^
24 RCL+ ST Z
25 X<>Y
26 ÷
27 -
28 STO× ST X
29 LASTX
30 STO+ ST Y
31 GTO 01
32 LBL 02
33 LN
34 X<>Y
35 CLX
36 STO ST Z
37 STO ST T
38 X<>Y
39 RTN
40 END
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Lambert W function (for HP Prime) - lyuka - 10-25-2020, 08:31 AM
RE: Lambert W function (for HP Prime) - Bill Triplett - 08-25-2022 03:17 AM



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