gamma()

Learn how to use the gamma() function to compute the gamma of the input parameter.

Computes the gamma function for the provided number.

Syntax

gamma(number)

Parameters

NameTypeRequiredDescription
numberreal✔️The number used to calculate the gamma function.

Returns

Gamma function of number.

Examples

The following example shows how to use the gamma() function to compute the gamma of the input parameter.

print result = gamma(5)

Output:

result
24

For computing log-gamma function, see loggamma().