Half-precision Γ(x+1) [HP-12C]
|
09-13-2020, 10:29 PM
(This post was last modified: 09-14-2020 08:52 AM by Albert Chan.)
Post: #10
|
|||
|
|||
RE: Half-precision Γ(x+1) [HP-12C]
Another approach is not to use asymptotic formula at all, and use Lanczos algorithm.
see The Log Gamma Function with C#, for comparison of different methods. I don't understand how it work, but Lanczos is amazing ! Translated code from above link, for HP-71B: Code: 10 DIM C(6) @ K=LN(2*PI)/2-5 >RUN >FOR X=10 TO 90 STEP 10 @ X, FNL(X), LN(GAMMA(X))-RES @ NEXT X 10 12.8018274802 -.0000000001 20 39.3398841871 .0000000001 30 71.2570389671 .0000000001 40 106.63176026 .000000001 50 144.565743946 0 60 184.533828862 -.000000001 70 226.190548324 0 80 269.291097651 0 90 313.65282995 0 Below is doing *negative* fractional factorials ! >FOR X=.1 TO .9 STEP .1 @ X, FNG(X), GAMMA(X)-RES @ NEXT X .1 9.51350769862 .00000000005 .2 4.59084371199 .00000000001 .3 2.99156898768 .00000000001 .4 2.21815954376 0 .5 1.7724538509 .00000000001 .6 1.48919224879 .00000000002 .7 1.29805533263 .00000000002 .8 1.16422971372 .00000000001 .9 1.06862870212 0 |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Half-precision Γ(x+1) [HP-12C] - Gerson W. Barbosa - 02-16-2020, 12:30 AM
RE: Half-precision Γ(x+1) [HP-12C] - Albert Chan - 02-16-2020, 05:47 PM
RE: Half-precision Γ(x+1) [HP-12C] - Gerson W. Barbosa - 02-16-2020, 07:39 PM
RE: Half-precision Γ(x+1) [HP-12C] - Gerson W. Barbosa - 04-23-2020, 10:59 AM
RE: Half-precision Γ(x+1) [HP-12C] - Albert Chan - 09-12-2020, 01:15 AM
RE: Half-precision Γ(x+1) [HP-12C] - Gerson W. Barbosa - 02-17-2020, 05:43 AM
RE: Half-precision Γ(x+1) [HP-12C] - Gamo - 02-20-2020, 08:25 AM
RE: 4/5th-precision Γ(x+1) [HP-41C] - Gerson W. Barbosa - 04-27-2020, 05:12 PM
RE: Half-precision Γ(x+1) [HP-12C] - Gerson W. Barbosa - 09-12-2020, 01:14 PM
RE: Half-precision Γ(x+1) [HP-12C] - Albert Chan - 09-13-2020 10:29 PM
RE: Half-precision Γ(x+1) [HP-12C] - Gerson W. Barbosa - 09-15-2020, 04:30 AM
RE: Half-precision Γ(x+1) [HP-12C] - bshoring - 09-16-2020, 08:02 PM
|
User(s) browsing this thread: 1 Guest(s)