Gamma function using Spouge Approximation
|
12-18-2013, 06:00 AM
(This post was last modified: 06-13-2014 12:34 PM by Namir.)
Post: #1
|
|||
|
|||
Gamma function using Spouge Approximation
HP-67 Implementation
Memory Map R0 = x and = x-1 R1 = a R2 = CHS R3 = Sum R4 = Integer part of I, x+a R5 = sqrt(2*pi) RI = I Listiing Code: 1 LBL A |
|||
06-08-2014, 03:45 PM
Post: #2
|
|||
|
|||
RE: Gamma function using Spouge Approximation
Hi Namir,
thanks for sharing this program. I pasted it into my RPN-97 emulator on the iPad and it works just fine, but only if step 68 is changed to a division. |
|||
06-13-2014, 12:35 PM
Post: #3
|
|||
|
|||
RE: Gamma function using Spouge Approximation
Thanks for your correction Willy. I corrected step 68 as you suggested.
Also thanks for fantastic HP-67/97 emulators for the iPad! Namir |
|||
06-13-2014, 09:57 PM
Post: #4
|
|||
|
|||
RE: Gamma function using Spouge Approximation
(06-13-2014 12:35 PM)Namir Wrote: Thanks for your correction Willy. I corrected step 68 as you suggested. Thank you for the kudos. BTW, your sometimes "unorthodox" listings caused me quite a bit of headache while implementing the new source code translation capability of the emulators. But finally things are coming together. So Code:
Code:
Code:
Code:
In fact, you may even enter Code:
Code:
|
|||
03-21-2015, 03:26 AM
Post: #5
|
|||
|
|||
RE: Gamma function using Spouge Approximation
Thanks Namir, for this program. I ran several samples and got a high degree of accuracy for the Gamma function.
Regards, Bob |
|||
04-07-2015, 09:43 PM
(This post was last modified: 04-30-2015 09:40 PM by bshoring.)
Post: #6
|
|||
|
|||
RE: Gamma function using Spouge Approximation
So far I am finding this program yields correct results for any positive number up to 55. For negative numbers (non-integer) I have gotten correct results on all the ones I have tried so far.
I have also modified the program somewhat to work on my HP-38C as well as the iOS emulator for HP-25 (GO-25 SciRPN) which has a capacity of 99 program steps. The latter was more of a challenge as the HP-25 has no factorial or ISZ functions so those have to be re-created using additional program steps. Regards, Bob |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)