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
47 lines (28 loc) • 886 B
Markdown
<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
Logarithm of the gamma function for real, positive numbers and complex numbers,
using Lanczos approximation for numbers and Stirling series for complex numbers.
```js
math.lgamma(n)
```
Parameter | Type | Description
--------- | ---- | -----------
`n` | number &
Type | Description
---- | -----------
number &
Type | Description
---- | -----------
```js
math.lgamma(5) // returns 3.178053830347945
math.lgamma(0) // returns Infinity
math.lgamma(-0.5) // returns NaN
math.lgamma(math.i) // returns -0.6509231993018536 - 1.8724366472624294i
```
[](gamma.md)