Gamma Function by Stieltjes Continued Fraction
|
09-03-2015, 08:10 PM
Post: #3
|
|||
|
|||
RE: Gamma Function by Stieltjes Continued Fraction
(09-01-2015 10:31 PM)lcwright1964 Wrote: I plan to port this directly and forthwith to the 67/97. I am keen on suggestions to save steps, because I would like to be able to fit the routine into the 49 steps of the HP33C/E or the HP25. The original GMST routine can be coded in 48 steps on a HP25, including the suggested change of the sqrt(2 Pi) constant. This is easy since the '25 uses line addressing instead of labels. Also the X↔Y R↑ sequence can be replaced by two consecutive R↓ commands (AFAIK the HP25 offers no R↑). However, with the additional accuracy improvement it's bit tricky to do it in 49 steps (50 is easy), but it can be done with the use of three data registers instead of one. Code: 01 STO 0 Instead of the stack this program uses R1 to store x, and R2 holds the constant 0.5 which is used several times. Since I am not sure whether starting a progam with R/S enables stack lift, the original 7 in the first line was moved and the 1 in R0 is provided by dividing x by x (which cannot be zero anyway). Since I do not own an HP25 I could not test all this, but I think it should work. Dieter |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)