Commit 2ffba3c7 authored by GoshaZotov's avatar GoshaZotov

add STDEV.S formula

parent 122b51c1
...@@ -4761,7 +4761,25 @@ $( function () { ...@@ -4761,7 +4761,25 @@ $( function () {
} ); } );
test( "Test: \"STDEVA\"", function () { test( "Test: \"STDEV.S\"", 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( "STDEV.S(A202:A211)", "A1", ws );
ok( oParser.parse(), "STDEV.S(A202:A211)" );
strictEqual( oParser.calculate().getValue().toFixed(8) - 0, 27.46391572, "STDEV.S(A202:A211)" );
} );
test( "Test: \"STDEVA\"", function () {
ws.getRange2( "E400" ).setValue( "\"123\"" ); ws.getRange2( "E400" ).setValue( "\"123\"" );
ws.getRange2( "E401" ).setValue( "134" ); ws.getRange2( "E401" ).setValue( "134" );
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
cFormulaFunctionGroup['Statistical'].push(cBINOM_DIST_RANGE, cFormulaFunctionGroup['Statistical'].push(cBINOM_DIST_RANGE,
cF_TEST, cFORECAST_ETS, cFORECAST_ETS_CONFINT, cFORECAST_ETS_SEASONALITY, cFORECAST_ETS_STAT, cF_TEST, cFORECAST_ETS, cFORECAST_ETS_CONFINT, cFORECAST_ETS_SEASONALITY, cFORECAST_ETS_STAT,
cHYPGEOM_DIST, cNEGBINOM_DIST, cNORM_DIST, cNORM_INV, cNORM_S_DIST, cHYPGEOM_DIST, cNEGBINOM_DIST, cNORM_DIST, cNORM_INV, cNORM_S_DIST,
cNORM_S_INV, cPERMUTATIONA, cPHI, cSTDEV_P, cSTDEV_S); cNORM_S_INV, cPERMUTATIONA, cPHI, cSTDEV_P);
cFormulaFunctionGroup['Financial'] = cFormulaFunctionGroup['Financial'] || []; cFormulaFunctionGroup['Financial'] = cFormulaFunctionGroup['Financial'] || [];
cFormulaFunctionGroup['Financial'].push(cPDURATION, cRRI); cFormulaFunctionGroup['Financial'].push(cPDURATION, cRRI);
cFormulaFunctionGroup['Mathematic'] = cFormulaFunctionGroup['Mathematic'] || []; cFormulaFunctionGroup['Mathematic'] = cFormulaFunctionGroup['Mathematic'] || [];
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
cF_TEST, cFORECAST_ETS, cFORECAST_ETS_CONFINT, cFORECAST_ETS_SEASONALITY, cF_TEST, cFORECAST_ETS, cFORECAST_ETS_CONFINT, cFORECAST_ETS_SEASONALITY,
cFORECAST_ETS_STAT, cHYPGEOM_DIST, cNEGBINOM_DIST, cNORM_DIST, cFORECAST_ETS_STAT, cHYPGEOM_DIST, cNEGBINOM_DIST, cNORM_DIST,
cNORM_INV, cNORM_S_DIST, cNORM_S_INV, cPERMUTATIONA, cPHI, cNORM_INV, cNORM_S_DIST, cNORM_S_INV, cPERMUTATIONA, cPHI,
cSTDEV_P, cSTDEV_S, cPDURATION, cRRI, cAGGREGATE, cMUNIT, cSTDEV_P, cPDURATION, cRRI, cAGGREGATE, cMUNIT,
cFORMULATEXT, cISFORMULA, cSHEET, cSHEETS); cFORMULATEXT, cISFORMULA, cSHEET, cSHEETS);
/** /**
...@@ -485,18 +485,6 @@ ...@@ -485,18 +485,6 @@
cSTDEV_P.prototype = Object.create(cBaseFunction.prototype); cSTDEV_P.prototype = Object.create(cBaseFunction.prototype);
cSTDEV_P.prototype.constructor = cSTDEV_P; cSTDEV_P.prototype.constructor = cSTDEV_P;
/**
* @constructor
* @extends {AscCommonExcel.cBaseFunction}
*/
function cSTDEV_S() {
cBaseFunction.call(this, "STDEV.S");
this.isXLFN = true;
}
cSTDEV_S.prototype = Object.create(cBaseFunction.prototype);
cSTDEV_S.prototype.constructor = cSTDEV_S;
/** /**
* @constructor * @constructor
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
cMODE_MULT, cMODE_SNGL, cNEGBINOMDIST, cNORMDIST, cNORMINV, cNORMSDIST, cNORMSINV, cPEARSON, cPERCENTILE, cMODE_MULT, cMODE_SNGL, cNEGBINOMDIST, cNORMDIST, cNORMINV, cNORMSDIST, cNORMSINV, cPEARSON, cPERCENTILE,
cPERCENTILE_EXC, cPERCENTILE_INC, cPERCENTRANK, cPERCENTRANK_EXC, cPERCENTRANK_INC, cPERMUT, cPOISSON, 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, 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, cSLOPE, cSMALL, cSTANDARDIZE, cSTDEV, cSTDEV_S, cSTDEVA, cSTDEVP, cSTDEVPA, cSTEYX, cTDIST, cT_DIST, cT_DIST_2T,
cT_DIST_RT, cT_INV, cT_INV_2T, cTINV, cTREND, cTRIMMEAN, cTTEST, cT_TEST, cVAR, cVARA, cVARP, cVAR_P, cVAR_S, cT_DIST_RT, cT_INV, cT_INV_2T, cTINV, cTREND, cTRIMMEAN, cTTEST, cT_TEST, cVAR, cVARA, cVARP, cVAR_P, cVAR_S,
cVARPA, cWEIBULL, cWEIBULL_DIST, cZTEST, cZ_TEST); cVARPA, cWEIBULL, cWEIBULL_DIST, cZTEST, cZ_TEST);
...@@ -6872,6 +6872,19 @@ ...@@ -6872,6 +6872,19 @@
return this.value = new cNumber(Math.sqrt(res / (count - 1))); return this.value = new cNumber(Math.sqrt(res / (count - 1)));
}; };
/**
* @constructor
* @extends {cSTDEV}
*/
function cSTDEV_S() {
cSTDEV.call(this);
this.name = "STDEV.S";
}
cSTDEV_S.prototype = Object.create(cSTDEV.prototype);
cSTDEV_S.prototype.constructor = cSTDEV_S;
/** /**
* @constructor * @constructor
* @extends {AscCommonExcel.cBaseFunction} * @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