factorial_fl()
Calculate factorial.
The function factorial_fl()calculates factorial of positive integers (n!). It's a simple wrapper of the Azure Data Explorer native gamma() function.
Note
This function is a UDF (user-defined function). For more information, see usage.
Syntax
factorial_fl(n)
Arguments
- n: The input integer.
Usage
factorial_fl() is a user-defined function. You can either embed its code in your query, or install it in your database. There are two usage options: ad hoc and persistent usage. See the below tabs for examples.
For ad hoc usage, embed its code using a let statement. No permission is required.
let factorial_fl=(n:int)
{
gamma(n+1)
}
;
range x from 1 to 10 step 3
| extend fx = factorial_fl(x)
x fx
1 1
4 24
7 5040
10 3628799
Feedback
Submit and view feedback for