(41) Γ(x+1) [HP-41C]
09-13-2020, 12:49 PM
Post: #11
 Albert Chan Senior Member Posts: 2,711 Joined: Jul 2018
RE: Γ(x+1) [HP-41C]
We can easily get reciprocal of continued fraction (here, b is rest of the CF terms).

$$\large 1 ÷ \left( 1 + \Large {1 \over (a-{1\over2})\;+\;b\;} \right) = \frac{(a-{1\over2})\;+\;b}{(a+{1\over2})\;+\;b} = \large 1 - \Large {1 \over (a+{1\over2})\;+\;b\;}$$

Example, this is the code for 1/Γ(x), using correction 1/c3(x)

Code:
50 DEF FNR(X)                              ! = 1/gamma 60 C=1 @ WHILE X<12 @ C=C*X @ X=X+1 @ END WHILE 70 C=C/(SQRT(2*PI)*X^(X-.5)*EXP(-X))       ! 1/stirling 80 FNR=C-C/(12*X+.5+1/(720/293*X+.609/X))  ! correction 90 END DEF
 « Next Oldest | Next Newest »

 Messages In This Thread (41) Γ(x+1) [HP-41C] - Gerson W. Barbosa - 04-29-2020, 09:45 PM RE: Γ(x+1) [HP-41C] - Gerson W. Barbosa - 04-30-2020, 08:35 PM RE: Γ(x+1) [HP-41C] - Albert Chan - 05-01-2020, 11:59 PM RE: Γ(x+1) [HP-41C] - Gerson W. Barbosa - 05-02-2020, 11:04 AM RE: Γ(x+1) [HP-41C] - pinkman - 04-30-2020, 09:58 PM RE: Γ(x+1) [HP-41C] - Gerson W. Barbosa - 05-01-2020, 08:46 PM RE: Γ(x+1) [HP-41C] - Gerson W. Barbosa - 05-01-2020, 05:59 PM RE: Γ(x+1) [HP-41C] - Gerson W. Barbosa - 05-03-2020, 05:29 PM RE: Γ(x+1) [HP-41C] - Gerson W. Barbosa - 05-09-2020, 02:42 PM RE: Γ(x+1) [HP-41C] - Albert Chan - 09-10-2020, 10:56 PM RE: Γ(x+1) [HP-41C] - Albert Chan - 09-13-2020 12:49 PM

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