From: "Dann Corbit" Subject: Re: Gamma function Date: Mon, 22 Mar 1999 11:06:02 -0800 Newsgroups: sci.math,sci.math.num-analysis Keywords: Code for evaluating Kristoffer Vinther wrote in message news:36F64837.EF2C3AF0@daimi.au.dk... >Hi. > >I need an effective algorithm to calculate the gamma-function value of a >real number, preferably at arbitrary precision. >It's a tough one; consider it a challenge ;-) Stephen L. Moshier wins the prize. He has the gamma function written at hardware precisions from float to double to 80 bit long double and 128 bit long double as well as an extended precision version called qfloat. It's at Netlib, in the Cephes collection. Have fun. -- C-FAQ: http://www.eskimo.com/~scs/C-faq/top.html "The C-FAQ Book" ISBN 0-201-84519-9 C.A.P. Newsgroup http://www.dejanews.com/~c_a_p C.A.P. FAQ: ftp://38.168.214.175/pub/Chess%20Analysis%20Project%20FAQ.htm ============================================================================== From: "Dann Corbit" Subject: Re: Gamma function Date: Tue, 04 May 1999 17:12:30 GMT Newsgroups: sci.math.num-analysis Sweet Lemon Hayward wrote in message news:372EBE21.91D9349E@durham.ac.uk... > Hello, > > does anybody know an efficient algorithm for evaluating the Gamma > function? I want to do it in my computer program. > > At the moment my program uses trapezium-rule integration, which is slow > and inaccurate. The Cephes collection at NETLIB has a very good gamma function. There used to be an error in it, but it has been corrected. Fast code, and well written. I recommend the whole collection. It is written in C. There is a lot of Fortran available at NETLIB too. If you can't find Fortran that you want, try GAMS. If you need some other language, then a web search is usually a good way to find things. -- C-FAQ: http://www.eskimo.com/~scs/C-faq/top.html "The C-FAQ Book" ISBN 0-201-84519-9 C.A.P. Newsgroup http://www.dejanews.com/~c_a_p C.A.P. FAQ: ftp://38.168.214.175/pub/Chess%20Analysis%20Project%20FAQ.htm