refactor: add missing jsdoc inside calculateRank.js (#3155)

This commit is contained in:
Alexandr Garbuzov
2023-08-28 10:16:56 +03:00
committed by GitHub
parent 5574fd264e
commit ecf1db6dce
+12
View File
@@ -1,7 +1,19 @@
/**
* Calculates the exponential cdf.
*
* @param {number} x The value.
* @returns {number} The exponential cdf.
*/
function exponential_cdf(x) {
return 1 - 2 ** -x;
}
/**
* Calculates the log normal cdf.
*
* @param {number} x The value.
* @returns {number} The log normal cdf.
*/
function log_normal_cdf(x) {
// approximation
return x / (1 + x);