Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: Gamma function: implementation? Message-ID: <11088@smoke.BRL.MIL> Date: 17 Sep 89 00:16:22 GMT References: <430008@hpqtdla.HP.COM> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 16 In article <430008@hpqtdla.HP.COM> bww@hpqtdla.HP.COM (Brian Woodroffe) writes: >I am trying to implement a port of a program that calls for a >"gamma" function. Unfortunately the compiler / math's library >I am using does not have such a function. Check for a "log of gamma" function. Because gamma grows at a rapid rate, that's generally a more useful function (usually called lgamma()). >As second question; what is a gamma function anyway? (I understand >that a factorial is the degenerate integer case.) And what is a >gamma function used for and where? Heavens, they have lots of applications. Look in a few textbooks. For an implementation, check out Chapter 6 of Press, Flannery, Teukolsky, & Vettering's "Numerical Recipes in C".