tgamma

This computes the value obtained with the gamma function.

TGAMMA

NAME

tgamma - This computes the value obtained with the gamma function.

SYNOPSIS

tgamma (number)

DESCRIPTION

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)!

PARAMETERS

number
Specify the number (float) used as argument for the tgamma function.

RETURN

The value of the gamma function.

EXAMPLES

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\].));

SEE ALSO

{{ include("includes/maths.sn") }}

AUTHOR

Written by Caroline Laplante, <claplante@sednove.com>

MODIFICATIONS

1.0 2014-09-09 21:24:14 laplante@sednove.com

Edit

© 2024 extenso Inc. All rights reserved.