Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,32 @@ var compute = require( './compute.js' );
*
* @param {Probability} p - probability value
* @param {number} a - scale parameter
* @param {boolean} [upper=false] - boolean indicating if the function should invert the upper tail of the incomplete gamma function instead; i.e., compute `xr` such that `Q(a,xr) = p`.
* @param {boolean} [upper=false] - boolean indicating if the function should invert the upper tail of the incomplete gamma function instead (i.e., compute `xr` such that `Q(a,xr) = p`)
* @returns {number} function value of the inverse
*
* @example
* var y = gammaincinv( 0.5, 2.0 );
* // returns ~1.678
*
* @example
* var y = gammaincinv( 0.1, 10.0 );
* // returns ~6.221
*
* @example
* var y = gammaincinv( 0.75, 3.0 );
* // returns ~3.92
*
* @example
* var y = gammaincinv( 0.75, 3.0, true );
* // returns ~1.727
*
* @example
* var y = gammaincinv( 0.75, NaN );
* // returns NaN
*
* @example
* var y = gammaincinv( NaN, 3.0 );
* // returns NaN
*/
function gammaincinv( p, a, upper ) {
if ( isnan( p ) || isnan( a ) ) {
Expand Down
Loading