tgamma - This computes the value obtained with the gamma function.
tgamma (argument)
The gamma function is mathematical special-function that is equivalent to an extension of the factorial function. It is non-elementary in the sense that it cannot be defined with other basis functions. It is mostly used in probability and statistics. It is not defined at zero and for negative integers, but it supports complex numbers. It is the Euler integral of second kind. In litterature, the function can be written as a huge Pi. The gamma function, T(n)=(n-1)!
Note: In the followings examples, the _ between the { should be removed to make it work.
One can use this function with integers: test(q(res={_{tgamma(4);}}.),q(res=6.)); With floats: test(q(res={_{tgamma(1.5);}}.),q(res=.886227.)); With another variable: test(q(res={_{ %include "/includes/extenso.sn"; a=3; tgamma(a); }}.),test(q(res={_{tgamma(0);}}.),q(res=INF.)); With a trigonometric function: test(q(res={_{ %include "/includes/extenso.sn"; a=cos(0); tgamma(a); }}.), q(res=1.)); With the limits: test(q(res={_{tgamma(0);}}.),q(res=INF.)); With negative numbers: test(q(res={_{tgamma(-1.5);}}.),q(res=2.36327.)); With arrays: test(q(res={_{tgamma(3,4,1);}}.),q(res=\[2,6,1\].));
Written by Caroline Laplante, <claplante@sednove.com>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
1.0 2014-09-09 21:24:14 laplante@sednove.com