gamma
gamma(n)
Compute the gamma function. For small values, the Lanczos approximation is used, and for large values the extended Stirling approximation.
Try it yourself:
$1 | gamma(4) Your input: gamma(4) Processed to: gamma(4) Result: 6 lastResult: undefined Variables: {} | 6 |
$2 | 3! Your input: 3! Processed to: 3! Result: 6 lastResult: 6 Variables: { "result": { "mathjs": "BigNumber", "value": "6" }, "$1": { "mathjs": "BigNumber", "value": "6" } } | 6 |
$3 | gamma(1/2) Your input: gamma(1/2) Processed to: gamma(1/2) Result: undefined lastResult: 6 Variables: { "result": { "mathjs": "BigNumber", "value": "6" }, "$1": { "mathjs": "BigNumber", "value": "6" }, "$2": { "mathjs": "BigNumber", "value": "6" } } | ✖ |
$4 | sqrt(pi) Your input: sqrt(pi) Processed to: sqrt(pi) Result: 1.77245385090551602729816748334114518279754945612238712821380779 lastResult: 6 Variables: { "result": { "mathjs": "BigNumber", "value": "6" }, "$1": { "mathjs": "BigNumber", "value": "6" }, "$2": { "mathjs": "BigNumber", "value": "6" } } | 1.772453851 |
See also:
All functions