Commit 0a9b8653 authored by GoshaZotov's avatar GoshaZotov

add NORM.INV formula

parent 73bd8493
...@@ -4137,6 +4137,17 @@ $( function () { ...@@ -4137,6 +4137,17 @@ $( function () {
} ); } );
test( "Test: \"NORM.INV \"", function () {
ws.getRange2( "F202" ).setValue( "0.908789" );
ws.getRange2( "F203" ).setValue( "40" );
ws.getRange2( "F204" ).setValue( "1.5" );
oParser = new parserFormula( "NORM.INV(F202,F203,F204)", "F1", ws );
ok( oParser.parse() );
strictEqual( oParser.calculate().getValue().toFixed(6) - 0, 42.000002 );
} );
test( "Test: \"PEARSON\"", function () { test( "Test: \"PEARSON\"", function () {
function pearson( x, y ) { function pearson( x, y ) {
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
cFormulaFunctionGroup['Statistical'] = cFormulaFunctionGroup['Statistical'] || []; cFormulaFunctionGroup['Statistical'] = cFormulaFunctionGroup['Statistical'] || [];
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_INV, cNORM_S_DIST, cHYPGEOM_DIST, cNEGBINOM_DIST, cNORM_S_DIST,
cNORM_S_INV, cPERMUTATIONA, cPHI); cNORM_S_INV, cPERMUTATIONA, cPHI);
cFormulaFunctionGroup['Financial'] = cFormulaFunctionGroup['Financial'] || []; cFormulaFunctionGroup['Financial'] = cFormulaFunctionGroup['Financial'] || [];
cFormulaFunctionGroup['Financial'].push(cPDURATION, cRRI); cFormulaFunctionGroup['Financial'].push(cPDURATION, cRRI);
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
cFormulaFunctionGroup['NotRealised'] = cFormulaFunctionGroup['NotRealised'] || []; cFormulaFunctionGroup['NotRealised'] = cFormulaFunctionGroup['NotRealised'] || [];
cFormulaFunctionGroup['NotRealised'].push(cDAYS, cISOWEEKNUM, cBITAND, cBITLSHIFT, cBITOR, cBITRSHIFT, cBITXOR, cFormulaFunctionGroup['NotRealised'].push(cDAYS, cISOWEEKNUM, cBITAND, cBITLSHIFT, cBITOR, cBITRSHIFT, cBITXOR,
cDBCS, cUNICHAR, cUNICODE, cBINOM_DIST_RANGE, cF_TEST, cFORECAST_ETS, cFORECAST_ETS_CONFINT, cDBCS, cUNICHAR, cUNICODE, cBINOM_DIST_RANGE, cF_TEST, cFORECAST_ETS, cFORECAST_ETS_CONFINT,
cFORECAST_ETS_SEASONALITY, cFORECAST_ETS_STAT, cHYPGEOM_DIST, cNEGBINOM_DIST, cNORM_INV, cFORECAST_ETS_SEASONALITY, cFORECAST_ETS_STAT, cHYPGEOM_DIST, cNEGBINOM_DIST,
cNORM_S_DIST, cNORM_S_INV, cPERMUTATIONA, cPHI, cPDURATION, cRRI, cAGGREGATE, cMUNIT, cFORMULATEXT, cISFORMULA, cNORM_S_DIST, cNORM_S_INV, cPERMUTATIONA, cPHI, cPDURATION, cRRI, cAGGREGATE, cMUNIT, cFORMULATEXT, cISFORMULA,
cSHEET, cSHEETS); cSHEET, cSHEETS);
...@@ -339,18 +339,6 @@ ...@@ -339,18 +339,6 @@
cNEGBINOM_DIST.prototype = Object.create(cBaseFunction.prototype); cNEGBINOM_DIST.prototype = Object.create(cBaseFunction.prototype);
cNEGBINOM_DIST.prototype.constructor = cNEGBINOM_DIST; cNEGBINOM_DIST.prototype.constructor = cNEGBINOM_DIST;
/**
* @constructor
* @extends {AscCommonExcel.cBaseFunction}
*/
function cNORM_INV() {
cBaseFunction.call(this, "NORM.INV");
this.isXLFN = true;
}
cNORM_INV.prototype = Object.create(cBaseFunction.prototype);
cNORM_INV.prototype.constructor = cNORM_INV;
/** /**
* @constructor * @constructor
* @extends {AscCommonExcel.cBaseFunction} * @extends {AscCommonExcel.cBaseFunction}
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
cFORECAST_LINEAR, cFREQUENCY, cFTEST, cGAMMA, cGAMMA_DIST, cGAMMADIST, cGAMMA_INV, cGAMMAINV, cGAMMALN, cFORECAST_LINEAR, cFREQUENCY, cFTEST, cGAMMA, cGAMMA_DIST, cGAMMADIST, cGAMMA_INV, cGAMMAINV, cGAMMALN,
cGAMMALN_PRECISE, cGAUSS, cGEOMEAN, cGROWTH, cHARMEAN, cHYPGEOMDIST, cINTERCEPT, cKURT, cLARGE, cLINEST, cGAMMALN_PRECISE, cGAUSS, cGEOMEAN, cGROWTH, cHARMEAN, cHYPGEOMDIST, cINTERCEPT, cKURT, cLARGE, cLINEST,
cLOGEST, cLOGINV, cLOGNORM_DIST, cLOGNORM_INV, cLOGNORMDIST, cMAX, cMAXA, cMEDIAN, cMIN, cMINA, cMODE, cLOGEST, cLOGINV, cLOGNORM_DIST, cLOGNORM_INV, cLOGNORMDIST, cMAX, cMAXA, cMEDIAN, cMIN, cMINA, cMODE,
cMODE_MULT, cMODE_SNGL, cNEGBINOMDIST, cNORMDIST, cNORM_DIST, cNORMINV, cNORMSDIST, cNORMSINV, cPEARSON, cPERCENTILE, cMODE_MULT, cMODE_SNGL, cNEGBINOMDIST, cNORMDIST, cNORM_DIST, cNORMINV, cNORM_INV, 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, cSTDEV_S, cSTDEVA, cSTDEVP, cSTDEV_P, cSTDEVPA, cSTEYX, cTDIST, cT_DIST, cT_DIST_2T, cSLOPE, cSMALL, cSTANDARDIZE, cSTDEV, cSTDEV_S, cSTDEVA, cSTDEVP, cSTDEV_P, cSTDEVPA, cSTEYX, cTDIST, cT_DIST, cT_DIST_2T,
...@@ -5517,6 +5517,19 @@ ...@@ -5517,6 +5517,19 @@
return this.value = norminv(arg0.getValue(), arg1.getValue(), arg2.getValue()); return this.value = norminv(arg0.getValue(), arg1.getValue(), arg2.getValue());
}; };
/**
* @constructor
* @extends {cNORMINV}
*/
function cNORM_INV() {
cNORMINV.call(this);
this.name = "NORM.INV";
}
cNORM_INV.prototype = Object.create(cNORMINV.prototype);
cNORM_INV.prototype.constructor = cNORM_INV;
cNORM_INV.prototype.isXLFN = true;
/** /**
* @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