Commit f47976fa authored by GoshaZotov's avatar GoshaZotov

add tests for EXPON.DIST

parent 295c1087
......@@ -1106,6 +1106,19 @@ $( function () {
strictEqual( oParser.calculate().getValue().toFixed(6) - 0, 0.068094, "GAMMADIST(A2,A3,A4,TRUE)" );
} );
test( "Test: \"EXPON.DIST\"", function () {
ws.getRange2( "A2" ).setValue( "0.2" );
ws.getRange2( "A3" ).setValue( "10" );
oParser = new parserFormula( "EXPON.DIST(A2,A3,TRUE)", "A1", ws );
ok( oParser.parse(), "EXPON.DIST(A2,A3,TRUE)" );
strictEqual( oParser.calculate().getValue().toFixed(8) - 0, 0.86466472, "EXPON.DIST(A2,A3,TRUE)" );
oParser = new parserFormula( "EXPON.DIST(0.2,10,FALSE)", "A1", ws );
ok( oParser.parse(), "EXPON.DIST(0.2,10,FALSE)" );
strictEqual( oParser.calculate().getValue().toFixed(8) - 0, 1.35335283, "EXPON.DIST(0.2,10,FALSE)" );
} );
test( "Test: \"CHIDIST\"", function () {
ws.getRange2( "A2" ).setValue( "18.307" );
ws.getRange2( "A3" ).setValue( "10" );
......
......@@ -58,7 +58,7 @@
cFormulaFunctionGroup['Statistical'] = cFormulaFunctionGroup['Statistical'] || [];
cFormulaFunctionGroup['Statistical'].push(cBETA_DIST, cBETA_INV, cBINOM_DIST, cBINOM_DIST_RANGE, cBINOM_INV,
cCHISQ_DIST, cCHISQ_DIST_RT, cCHISQ_INV, cCHISQ_INV_RT, cCHISQ_TEST, cCONFIDENCE_NORM, cCONFIDENCE_T,
cCOVARIANCE_P, cCOVARIANCE_S, cEXPON_DIST, cF_DIST, cF_DIST_RT, cF_INV, cF_INV_RT, cF_TEST, cFORECAST_ETS,
cCOVARIANCE_P, cCOVARIANCE_S, cF_DIST, cF_DIST_RT, cF_INV, cF_INV_RT, cF_TEST, cFORECAST_ETS,
cFORECAST_ETS_CONFINT, cFORECAST_ETS_SEASONALITY, cFORECAST_ETS_STAT, cFORECAST_LINEAR, cGAMMA, cGAMMA_DIST,
cGAMMA_INV, cGAMMALN_PRECISE, cHYPGEOM_DIST, cLOGNORM_DIST, cLOGNORM_INV, cMODE_MULT, cMODE_SNGL,
cNEGBINOM_DIST, cNORM_DIST, cNORM_INV, cNORM_S_DIST, cNORM_S_INV, cPERCENTILE_EXC, cPERCENTILE_INC,
......@@ -374,18 +374,6 @@
cERFC_PRECISE.prototype = Object.create(cBaseFunction.prototype);
cERFC_PRECISE.prototype.constructor = cERFC_PRECISE;
/**
* @constructor
* @extends {AscCommonExcel.cBaseFunction}
*/
function cEXPON_DIST() {
cBaseFunction.call(this, "EXPON.DIST");
this.isXLFN = true;
}
cEXPON_DIST.prototype = Object.create(cBaseFunction.prototype);
cEXPON_DIST.prototype.constructor = cEXPON_DIST;
/**
* @constructor
* @extends {AscCommonExcel.cBaseFunction}
......
......@@ -2612,6 +2612,7 @@
cEXPON_DIST.prototype.constructor = cEXPON_DIST;
cEXPON_DIST.prototype.argumentsMin = 3;
cEXPON_DIST.prototype.argumentsMax = 3;
cEXPON_DIST.prototype.isXLFN = true;
cEXPON_DIST.prototype.Calculate = function (arg) {
var oArguments = this._prepareArguments(arg, arguments[1], true);
var argClone = oArguments.args;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment