function betainc( x, a, b, regularized, upper ) {
	var out = [ 0.0, 0.0 ];
	regularized = ( regularized === false ) ? false : true; // eslint-disable-line no-unneeded-ternary
	upper = ( upper === true ) ? true : false; // eslint-disable-line no-unneeded-ternary
	kernelBetainc( x, a, b, regularized, upper, out, 1, 0 );
	return out[ 0 ];
}
Evaluates the incomplete beta function.

@param {Probability} x - function parameter
@param {NonNegativeNumber} a - function parameter
@param {NonNegativeNumber} b - function parameter
@param {boolean} [regularized=true] - boolean indicating if the function should evaluate the regularized or non-regularized incomplete beta function
@param {boolean} [upper=false] - boolean indicating if the function should return the upper tail of the incomplete beta function
@returns {number} function value

@example
var y = betainc( 0.5, 2.0, 2.0 );
// returns 0.5

@example
var y = betainc( 0.5, 2.0, 2.0, false );
// returns ~0.083

@example
var y = betainc( 0.2, 1.0, 2.0 );
// returns 0.36