Generalized to all complex numbers
z, except for non-positive integers, the gamma function can be expressed as an infinite product
γ ≈ 0.577216 is the Euler–Mascheroni constant.
$ npm install math-gamma
var gamma = ;
gamma( x )
Evaluates the gamma function.
var val = ;// returns 3! = 6val = ;// returns ~2.363val = ;// returns ~-3.545val = ;// returns ~1.772
var linspace = ;var gamma = ;var x = ;var v;var i;for i = 0; i < xlength; i++v = ;console;
To run the example code from the top-level application directory,
$ node ./examples/index.js
This repository uses tape for unit tests. To run the tests, execute the following command in the top-level application directory:
$ make test
All new feature development should have corresponding unit tests to validate correct functionality.
This repository uses Istanbul as its code coverage tool. To generate a test coverage report, execute the following command in the top-level application directory:
$ make test-cov
Istanbul creates a
./reports/coverage directory. To access an HTML version of the report,
$ make view-cov
This repository uses Testling for browser testing. To run the tests in a (headless) local web browser, execute the following command in the top-level application directory:
$ make test-browsers
To view the tests in a local web browser,
$ make view-browser-tests
Copyright © 2016. The Compute.io Authors.