1.0.3 • Published 3 months ago

@toshiara/special-gammaln v1.0.3

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 months ago

gammaln

Natural logarithm of the gamma function.

This package is a rewrite of @stdlib/math-base-special-gammaln in Typescript. This package supports both CommonJs and ES Modules.

Usage

// for CommonJs
const { gammaln } = require('@toshiara/special-gammaln');

// for ES Modules
import { gammaln } from '@toshiara/special-gammaln';

gammaln(x)

Evaluates the natural logarithm of the gamma function.

gammaln(1.0);
// returns 0.0

gammaln(2.0);
// returns 0.0

gammaln(4.0);
// returns 1.791759469228055

gammaln(0.5);
// returns 0.5723649429247001

gammaln(-0.5);
// returns 1.2655121234846454

gammaln(0.0);
// returns Infinity

gammaln(NaN);
// returns NaN