Evaluates the beta function and the natural logarithm of the beta function.
The Beta function, also called the Euler integral, is defined as
It is related to the Gamma function via the following equation
and
This package supports both CommonJs and ES Modules.
$ npm install @toshiara/special-beta
// for CommonJs
const { beta, betaln } = require('@toshiara/special-beta');
// for ES Modules
import { beta, betaln } from '@toshiara/special-beta';
Evaluates the beta function.
beta(1.2, 2.4);
// returns 0.3068371659652535
beta(0.1, 0.3);
// returns 12.8305985363213
Evaluates the beta function.
betaln(1, 2);
// returns -0.6931471805599453
betaln(1.2, 2.4);
// returns -1.181438076130887