<commit_before><commit_msg>Rename number.js to quantile.js<commit_after>'use strict';

// MODULES //

var betaincinv = require( 'compute-betaincinv/lib/ibeta_inv_imp.js' );


// QUANTILE //

/**

*	Evaluates the quantile function for a Beta distribution with first shape parameter `alpha` and second shape parameter `beta` at a probability `p`.
*
* @param {Number} p - input value
* @param {Number} alpha - first shape parameter
* @param {Number} beta - second shape parameter
* @returns {Number} evaluated quantile function
*/
function quantile( p, alpha, beta ) {
	if ( p !== p || p < 0 || p > 1 ) {
		return NaN;
	}
	return betaincinv( alpha, beta, p, 1 - p )[ 0 ];
} // end FUNCTION quantile()


// EXPORTS //

module.exports = quantile;

{'fraction_non_alphanumeric': 0.13746630727762804, 'fraction_numerical': 0.005390835579514825, 'mean_word_length': 3.5864197530864197, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5937222', 'n_tokens_mistral': 253, 'n_tokens_neox': 242, 'n_words': 83}