12C+ Gamma  Printable Version + HP Forums (https://archived.hpcalc.org/museumforum) + Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum1.html) + Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum2.html) + Thread: 12C+ Gamma (/thread152200.html) 
12C+ Gamma  Gerson W. Barbosa  06252009 Gamma(x+1) (0 <= x <= 39.4) This is based on the following approximation I've come up with:
Obviously, this is not the proper way to compute the Gamma function. It's just an example of what can be done on the fast 12C+. Just for an idea, it would take about 7 minutes to compute Gamma(40) on a normal 12C using this method. Gerson. 
The approximation is being used reversely, that is, it is meant to approximate an ~ n!/(2*sqrt2)*(2/ln(2))^(n+1)
I found it when thinking about John Smitherman's math joke turned into a problem. The numbers 2, 6, 34, 294... (which showed as the problem was getting progressively more complex) ought to mean something... I couldn't find it at OEIS but I found 1, 3, 17, 147..., the halved sequence. Eventually I found out the original sequence is the row sums of SierpinskiPascalMacMahon triangle, whatever this might be. I just intended to put a computationally intensive programming problem to the 12C+ to see how it performed. For computing Gamma function on the 12C+ or the normal 12C and 12c Platinum there isn't anything better than Egan Ford's program: http://www.hpmuseum.org/cgisys/cgiwrap/hpmuseum/archv016.cgi?read=100275 See message #6.
Edited: 26 June 2009, 10:30 a.m.
Re: 12C+ Gamma  Bart (UK)  06292009 Just for fun I thought I'd try it on the new 35s to see how it did (considering it's slighly(?) old CPU).
Bart
Re: 12C+ Gamma  Gerson W. Barbosa  06292009 13 and 23 seconds, respectively, on the 33s which used to be my fastest RPN calculator. I wonder how nice it would be if they released a new 15C+. If it were as fast as the new 12C+, 60.5 CHS x! would take about 200 ms to display 1.527756e97 instead of current 13 seconds. Gerson.
Re: 12C+ Gamma  Raymund Heuvel  06292009 HP71B with Math Pack
a=time @ GAMMA(13.12); @ timea Edited: 29 June 2009, 6:37 p.m.
Re: 12C+ Gamma  Gerson W. Barbosa  06292009 Quote:
Haven't you missed a "1" before ".23"? ...and 2.04 seconds for GAMMA(68.5).
Gerson.
Re: 12C+ Gamma  Raymund Heuvel  06292009 a=time @ GAMMA(13.12); @ timea BR
Ray
Re: 12C+ Gamma  Marcus von Cube, Germany  06302009 Mine must be on steroids: .09 seconds for GAMMA(13.12).
It appears to be a very inaccurate measurement because several tries resulted in vastly disparate timing results, a few outcomes even with a negative sign.
Re: 12C+ Gamma  Gerson W. Barbosa  06302009 I was doing a=time @ GAMMA(13.12) @ timea (without semicollon). Now I get 0.21 to 0.22 and 1.02 to 1.05 for GAMMA(68.5). 1BBBB version also with a 32K RAM module and card reader. They have no effect on timing though. Thanks! Gerson.
Re: 12C+ Gamma  Bart (UK)  06302009 A fast 15C would be a dream come true.
01 LBL A 23 2 45 1/x Compared to the original post, one can see the advantage of RPN here. Although this is probably not the most optimum. 12.12 XEQ A, 15.5s; 648,976,950.9 40 XEQ A, 30s Considering the program is 50% longer, that makes the 20S 3x faster than the 35s. Possibly the advantage of simple data types? Bart edited to try and make listing more readable
Edited: 30 June 2009, 11:09 a.m.
