Skip to main content
Module

x/simplestatistics/src/gamma.js

simple statistics for node & browser javascript
Go to Latest
import * as simplestatistics from "https://deno.land/x/simplestatistics@v7.7.5/src/gamma.js";

Functions

Compute the gamma function of a value using Nemes' approximation. The gamma of n is equivalent to (n-1)!, but unlike the factorial function, gamma is defined for all real n except zero and negative integers (where NaN is returned). Note, the gamma function is also well-defined for complex numbers, though this implementation currently does not handle complex numbers as input values. Nemes' approximation is defined here as Theorem 2.2. Negative values use Euler's reflection formula for computation.