mathjs
Version:
Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser with support for symbolic computation, comes with a large set of built-in functions and constants, and offers an integrated solution to work with dif
44 lines (27 loc) • 920 B
Markdown
<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
Compute the gamma function of a value using Lanczos approximation for
small values, and an extended Stirling approximation for large values.
For matrices, the function is evaluated element wise.
```js
math.gamma(n)
```
Parameter | Type | Description
--------- | ---- | -----------
`n` | number &
Type | Description
---- | -----------
number &
```js
math.gamma(5) // returns 24
math.gamma(-0.5) // returns -3.5449077018110335
math.gamma(math.i) // returns -0.15494982830180973 - 0.49801566811835596i
```
[ ](combinations.md),
[ ](factorial.md),
[ ](permutations.md)