Commit b8b2c32d authored by GoshaZotov's avatar GoshaZotov

add tests for CONFIDENCE.NORM/ONFIDENCE.T

parent 1bf2b146
......@@ -2940,6 +2940,24 @@ $( function () {
} );
test( "Test: \"CONFIDENCE.NORM\"", function () {
ws.getRange2( "A2" ).setValue( "0.05" );
ws.getRange2( "A3" ).setValue( "2.5" );
ws.getRange2( "A4" ).setValue( "50" );
oParser = new parserFormula( "CONFIDENCE.NORM(A2,A3,A4)", "A1", ws );
ok( oParser.parse() );
strictEqual( oParser.calculate().getValue().toFixed( 6 ) - 0, 0.692952);
} );
test( "Test: \"CONFIDENCE.T\"", function () {
oParser = new parserFormula( "CONFIDENCE.T(0.05,1,50)", "A1", ws );
ok( oParser.parse() );
strictEqual( oParser.calculate().getValue().toFixed( 9 ) - 0, 0.284196855);
} );
test( "Test: \"CORREL\"", function () {
oParser = new parserFormula( "CORREL({2.532,5.621;2.1,3.4},{5.32,2.765;5.2,\"f\"})", "A1", ws );
......
......@@ -2073,9 +2073,6 @@
return new cError(cErrorType.not_numeric);
}
//ScTDistFunction aFunc( *this, fAlpha, fSize, nType );
//double fVal = lcl_IterateInverse( aFunc, fSize * 0.5, fSize, bConvError );
var aFunc = new TDISTFUNCTION(alpha, size - 1, 2);
var oVal = iterateInverse(aFunc, size * 0.5, size);
var bConvError = oVal.bError;
......
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