Commit d9ebb000 authored by GoshaZotov's avatar GoshaZotov

add VAR.P formula

parent cf4c2a55
......@@ -4546,6 +4546,27 @@ $( function () {
} );
test( "Test: \"VAR.P\"", function () {
ws.getRange2( "A202" ).setValue( "1345" );
ws.getRange2( "A203" ).setValue( "1301" );
ws.getRange2( "A204" ).setValue( "1368" );
ws.getRange2( "A205" ).setValue( "1322" );
ws.getRange2( "A206" ).setValue( "1310" );
ws.getRange2( "A207" ).setValue( "1370" );
ws.getRange2( "A208" ).setValue( "1318" );
ws.getRange2( "A209" ).setValue( "1350" );
ws.getRange2( "A210" ).setValue( "1303" );
ws.getRange2( "A211" ).setValue( "1299" );
oParser = new parserFormula( "VAR.P(A202:A211)", "A1", ws );
ok( oParser.parse() );
strictEqual( oParser.calculate().getValue().toFixed(2) - 0, 678.84 );
} );
/*
* Lookup and Reference
*/
......
......@@ -60,7 +60,7 @@
cCOVARIANCE_S, cF_TEST, cFORECAST_ETS, cFORECAST_ETS_CONFINT, cFORECAST_ETS_SEASONALITY, cFORECAST_ETS_STAT,
cHYPGEOM_DIST, cMODE_MULT, cMODE_SNGL, cNEGBINOM_DIST, cNORM_DIST, cNORM_INV, cNORM_S_DIST,
cNORM_S_INV, cPERMUTATIONA, cPHI, cSTDEV_P, cSTDEV_S,
cT_TEST, cVAR_P, cVAR_S, cWEIBULL_DIST, cZ_TEST);
cT_TEST, cVAR_S, cWEIBULL_DIST, cZ_TEST);
cFormulaFunctionGroup['Financial'] = cFormulaFunctionGroup['Financial'] || [];
cFormulaFunctionGroup['Financial'].push(cPDURATION, cRRI);
cFormulaFunctionGroup['Mathematic'] = cFormulaFunctionGroup['Mathematic'] || [];
......@@ -76,7 +76,7 @@
cCOVARIANCE_P, cCOVARIANCE_S, cF_TEST, cFORECAST_ETS, cFORECAST_ETS_CONFINT, cFORECAST_ETS_SEASONALITY,
cFORECAST_ETS_STAT, cHYPGEOM_DIST, cMODE_MULT, cMODE_SNGL, cNEGBINOM_DIST, cNORM_DIST,
cNORM_INV, cNORM_S_DIST, cNORM_S_INV, cPERMUTATIONA, cPHI,
cSTDEV_P, cSTDEV_S, cT_TEST, cVAR_P, cVAR_S, cWEIBULL_DIST, cZ_TEST, cPDURATION, cRRI, cAGGREGATE, cMUNIT,
cSTDEV_P, cSTDEV_S, cT_TEST, cVAR_S, cWEIBULL_DIST, cZ_TEST, cPDURATION, cRRI, cAGGREGATE, cMUNIT,
cFORMULATEXT, cISFORMULA, cSHEET, cSHEETS);
/**
......@@ -619,18 +619,6 @@
cUNICODE.prototype = Object.create(cBaseFunction.prototype);
cUNICODE.prototype.constructor = cUNICODE;
/**
* @constructor
* @extends {AscCommonExcel.cBaseFunction}
*/
function cVAR_P() {
cBaseFunction.call(this, "VAR.P");
this.isXLFN = true;
}
cVAR_P.prototype = Object.create(cBaseFunction.prototype);
cVAR_P.prototype.constructor = cVAR_P;
/**
* @constructor
* @extends {AscCommonExcel.cBaseFunction}
......
......@@ -71,7 +71,7 @@
cNORMSINV, cPEARSON, cPERCENTILE, cPERCENTILE_EXC, cPERCENTILE_INC, cPERCENTRANK, cPERCENTRANK_EXC,
cPERCENTRANK_INC, cPERMUT, cPOISSON, cPOISSON_DIST, cPROB, cQUARTILE, cQUARTILE_EXC, cQUARTILE_INC, cRANK, cRANK_AVG, cRANK_EQ,
cRSQ, cSKEW, cSKEW_P,cSLOPE, cSMALL, cSTANDARDIZE, cSTDEV, cSTDEVA, cSTDEVP, cSTDEVPA, cSTEYX, cTDIST, cT_DIST,
cT_DIST_2T, cT_DIST_RT, cT_INV, cT_INV_2T, cTINV, cTREND, cTRIMMEAN, cTTEST, cVAR, cVARA, cVARP, cVARPA,
cT_DIST_2T, cT_DIST_RT, cT_INV, cT_INV_2T, cTINV, cTREND, cTRIMMEAN, cTTEST, cVAR, cVARA, cVARP, cVAR_P, cVARPA,
cWEIBULL, cZTEST);
cFormulaFunctionGroup['NotRealised'] = cFormulaFunctionGroup['NotRealised'] || [];
......@@ -7276,6 +7276,20 @@
return this.value = _var(arr0);
};
/**
* @constructor
* @extends {cVARP}
*/
function cVAR_P() {
cVARP.call(this);
this.name = "VAR.P";
}
cVAR_P.prototype = Object.create(cVARP.prototype);
cVAR_P.prototype.constructor = cVAR_P;
cVAR_P.prototype.isXLFN = true;
/**
* @constructor
* @extends {AscCommonExcel.cBaseFunction}
......
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