Info | ||
---|---|---|
| ||
This routine is available since starting with katl-commons 2.5. |
Syntax
:fact(number)
Description
:Excerpt |
---|
Returns the factorial of a number. |
Parameters
:Parameter | Type | Required | Description |
---|---|---|---|
number | Number | Yes | The non-negative number for which you want the factorial. If number is not an integer, it is truncated. |
Return type
:number
Example
:Code Block |
---|
number a = fact(5); print("a= " + a); number b = fact(3.7); print("b= " + b); number c = fact(-3); print("c= " + c); |
Prints:
a= 120 ;
b= 6;
c= NaN;
See
Also:contentbylabel
also
Filter by label (Content by label) | ||||||||
---|---|---|---|---|---|---|---|---|
|