[Maxima] Implementation of Gamma functions
drdieterkaiser at web.de
Sat Sep 6 14:55:09 CDT 2008
Thank very much for the feedback.
I like long names too. For use it is possible to define a short name via a
function definition or an alias. Second, I would like the convention that the
main name of the function is always at the beginning e.g. laguerre_generalized
and not gen_laguerre. The long names would look like:
Yes, gamma_greek is the most confusing name and perhaps we should avoid the use
of this function. The Maxima symbol gammagreek is only used in the code of
specint and perhaps could be completely eliminated.
The biggest problem is that it is not always clear what is meant by the
Incomplete Gamma function. A&S gives three different definitions with the
formulas 6.5.1, 6.5.2 and 6.5.3 but do not distinguish the definitions with
different names. The definitions are:
6.5.1: P(a,x) = 1/Gamma(a) * integral(exp(-t)*t^(a-1),t,0,x) (lower tail)
6.5.2: gamma(a,x) = P(a,x)*Gamma(a) (lower case Greek gamma)
6.5.3: Gamma(a,x) = integral(exp(-t)*t^(a-1),t,x,inf) (upper tail)
= Gamma(a)-gamma(a,x) (upper case Greek gamma)
The Maxima symbol gammagreek follows the definition in A&S 6.5.2. The Maxima
symbol gammaincomplete means the definition 6.5.3.
The Numerical Recipes use the following conventions:
P(a,x) = Gamma(a,x)/gamma(a) (Incomplete Gamma function)
Q(a,x) = gamma(a,x)/gamma(a) (Complement of the Incomplete Gamma function)
That is opposite to A&S. Here P(a,x) is the upper tail and not the lower tail of
the integral and the function is divided by Gamma(a). The numerical Recipes do
not give extra names for Gamma(a,x) or gamma(a,x).
The names I have suggested follow the conventions of functions.wolfram.com.
There we have the following definition for the Incomplete Gamma function which
is equal to A&S 6.5.3:
Gamma(a,z) = (exp(-t)*t^(a-1),t,x,inf) (upper tail, Upper case Greek gamma)
A very important feature of this definition is that the interconnections between
a lot of special functions can be expressed more easy and directly with this
definition of the Incomplete Gamma function.
functions.wolfram.com do not introduce a name for the complement of the
Incomplete Gamma function. For the Gamma Incomplete function divided by gamma(a)
the name Regularized Incomplete Gamma function is introduced and the symbol
Sorry, but I have not seen that we have numerical routines for the Gamma
functions in the code of numdistrib.lisp. I will have a look at the routines and
compare them against the routines I have written.
More information about the Maxima