diff options
Diffstat (limited to 'sc/source/core/tool/interpr3.cxx')
-rw-r--r-- | sc/source/core/tool/interpr3.cxx | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx index 0cb0cc8b902a..8fa0a0e5791d 100644 --- a/sc/source/core/tool/interpr3.cxx +++ b/sc/source/core/tool/interpr3.cxx @@ -721,6 +721,30 @@ void ScInterpreter::ScChiSqDist() } } +void ScInterpreter::ScChiSqDist_MS() +{ + sal_uInt8 nParamCount = GetByte(); + if ( !MustHaveParamCount( nParamCount, 3, 3 ) ) + return; + bool bCumulative = GetBool(); + double fDF = ::rtl::math::approxFloor( GetDouble() ); + if ( fDF < 1.0 || fDF > 1E10 ) + PushIllegalArgument(); + else + { + double fX = GetDouble(); + if ( fX < 0 ) + PushIllegalArgument(); + else + { + if ( bCumulative ) + PushDouble( GetChiSqDistCDF( fX, fDF ) ); + else + PushDouble( GetChiSqDistPDF( fX, fDF ) ); + } + } +} + void ScInterpreter::ScGamma() { double x = GetDouble(); |