Lines Matching refs:x

70     virtual double GetValue(double x) const = 0;
203 double ScInterpreter::phi(double x) in phi() argument
206 return 0.39894228040143268 * exp(-(x * x) / 2.0); in phi()
209 double ScInterpreter::integralPhi(double x) in integralPhi() argument
211 return 0.5 * ::rtl::math::erfc(-x * 0.7071067811865475); // * 1/sqrt(2) in integralPhi()
214 double ScInterpreter::taylor(double* pPolynom, sal_uInt16 nMax, double x) in taylor() argument
220 nVal = pPolynom[i] + (nVal * x); in taylor()
225 double ScInterpreter::gauss(double x) in gauss() argument
252 double xAbs = fabs(x); in gauss()
263 if (x < 0.0) in gauss()
273 double ScInterpreter::gaussinv(double x) in gaussinv() argument
278 q=x-0.5; in gaussinv()
333 if(q>0) t=1-x; in gaussinv()
334 else t=x; in gaussinv()
445 double ScInterpreter::Fakultaet(double x) in Fakultaet() argument
448 x = ::rtl::math::approxFloor(x); in Fakultaet()
449 if (x < 0.0) in Fakultaet()
451 else if (x == 0.0) in Fakultaet()
453 else if (x <= 170.0) in Fakultaet()
455 double fTemp = x; in Fakultaet()
459 x *= fTemp; in Fakultaet()
468 return x; in Fakultaet()
667 double ScInterpreter::GetFDist(double x, double fF1, double fF2) in GetFDist() argument
670 double arg = fF2/(fF2+fF1*x); in GetFDist()
807 double x = GetDouble(); in ScGamma() local
809 if (x <= 0.0 && x == ::rtl::math::approxFloor(x)) in ScGamma()
813 fResult = GetGamma(x); in ScGamma()
827 double x = GetDouble(); in ScLogGamma() local
828 if (x > 0.0) // constraint from ODFF in ScLogGamma()
829 PushDouble( GetLogGamma(x)); in ScLogGamma()
1077 double alpha, beta, x; in ScBetaDist() local
1093 x = GetDouble(); in ScBetaDist()
1103 if (x < fLowerBound) in ScBetaDist()
1107 if (x > fUpperBound) in ScBetaDist()
1112 x = (x-fLowerBound)/fScale; // convert to standard form in ScBetaDist()
1113 PushDouble(GetBetaDist(x, alpha, beta)); in ScBetaDist()
1118 if (x < fLowerBound || x > fUpperBound) in ScBetaDist()
1123 x = (x-fLowerBound)/fScale; in ScBetaDist()
1124 PushDouble(GetBetaDistPDF(x, alpha, beta)/fScale); in ScBetaDist()
1231 double ScInterpreter::GetBinomDistPMF(double x, double n, double p) in GetBinomDistPMF() argument
1241 return GetBetaDistPDF(p, x+1.0, n-x+1.0)/(n+1.0); in GetBinomDistPMF()
1244 sal_uInt32 max = static_cast<sal_uInt32>(n - x); in GetBinomDistPMF()
1252 sal_uInt32 max = static_cast<sal_uInt32>(x); in GetBinomDistPMF()
1287 double x = ::rtl::math::approxFloor(GetDouble()); in ScB() local
1290 if (n < 0.0 || x < 0.0 || x > n || p < 0.0 || p > 1.0) in ScB()
1294 PushDouble( (x == 0.0) ? 1.0 : 0.0 ); in ScB()
1297 PushDouble( (x == n) ? 1.0 : 0.0); in ScB()
1299 PushDouble(GetBinomDistPMF(x,n,p)); in ScB()
1357 double x = ::rtl::math::approxFloor(GetDouble()); in ScBinomDist() local
1360 if (n < 0.0 || x < 0.0 || x > n || p < 0.0 || p > 1.0) in ScBinomDist()
1367 PushDouble( (x==0.0 || bIsCum) ? 1.0 : 0.0 ); in ScBinomDist()
1372 PushDouble( (x==n) ? 1.0 : 0.0); in ScBinomDist()
1376 PushDouble( GetBinomDistPMF(x,n,p)); in ScBinomDist()
1379 if (x == n) in ScBinomDist()
1384 if (x == 0.0) in ScBinomDist()
1391 PushDouble(GetBetaDist(q,n-x,x+1.0)); in ScBinomDist()
1397 sal_uInt32 max = static_cast<sal_uInt32> (n - x) - 1; in ScBinomDist()
1406 PushDouble(lcl_GetBinomDistRange(n,n-x,n,fFactor,q,p)); in ScBinomDist()
1410 PushDouble( lcl_GetBinomDistRange(n,0.0,x,fFactor,p,q)) ; in ScBinomDist()
1471 double x = GetDouble(); // x in ScNegBinomDist() local
1472 if (r < 0.0 || x < 0.0 || p < 0.0 || p > 1.0) in ScNegBinomDist()
1478 for (double i = 0.0; i < x; i++) in ScNegBinomDist()
1494 double x = GetDouble(); // x in ScNormDist() local
1501 PushDouble(integralPhi((x-mue)/sigma)); in ScNormDist()
1503 PushDouble(phi((x-mue)/sigma)/sigma); in ScNormDist()
1515 double x = GetDouble(); // x in ScLogNormDist() local
1523 if (x <= 0.0) in ScLogNormDist()
1526 PushDouble(integralPhi((log(x)-mue)/sigma)); in ScLogNormDist()
1530 if (x <= 0.0) in ScLogNormDist()
1533 PushDouble(phi((log(x)-mue)/sigma)/sigma/x); in ScLogNormDist()
1550 double x = GetDouble(); // x in ScExpDist() local
1555 if (x >= 0.0) in ScExpDist()
1556 PushDouble(lambda * exp(-lambda*x)); in ScExpDist()
1562 if (x > 0.0) in ScExpDist()
1563 PushDouble(1.0 - exp(-lambda*x)); in ScExpDist()
1636 double x = GetDouble(); // x in ScWeibull() local
1637 if (alpha <= 0.0 || beta <= 0.0 || x < 0.0) in ScWeibull()
1640 PushDouble(alpha/pow(beta,alpha)*pow(x,alpha-1.0)* in ScWeibull()
1641 exp(-pow(x/beta,alpha))); in ScWeibull()
1643 PushDouble(1.0 - exp(-pow(x/beta,alpha))); in ScWeibull()
1655 double x = ::rtl::math::approxFloor(GetDouble()); // discrete distribution in ScPoissonDist() local
1656 if (lambda < 0.0 || x < 0.0) in ScPoissonDist()
1666 PushDouble( exp(x*log(lambda)-lambda-GetLogGamma(x+1.0))); in ScPoissonDist()
1671 for ( double f = 0.0; f < x; ++f ) in ScPoissonDist()
1685 PushDouble(GetUpRegIGamma(x+1.0,lambda)); in ScPoissonDist()
1689 if (x >= 936.0) // result is always undistinghable from 1 in ScPoissonDist()
1695 int nEnd = sal::static_int_cast<int>( x ); in ScPoissonDist()
1745 double x = ::rtl::math::approxFloor(GetDouble()); in ScHypGeomDist() local
1747 if( (x < 0.0) || (n < x) || (M < x) || (N < n) || (N < M) || (x < n - N + M) ) in ScHypGeomDist()
1756 size_t nEstContainerSize = static_cast<size_t>( x + ::std::min( n, M ) ); in ScHypGeomDist()
1767 double fCNumVarUpper = N - n - M + x - 1.0; in ScHypGeomDist()
1769 if ( N - n - M + x >= M - x + 1.0 ) in ScHypGeomDist()
1771 fCNumVarUpper = M - x - 1.0; in ScHypGeomDist()
1772 fCDenomVarLower = N - n - 2.0*(M - x) + 1.0; in ScHypGeomDist()
1778 double fCDenomUpper = N - n - M + x + 1.0 - fCDenomVarLower; in ScHypGeomDist()
1804 if ( fCDenomUpper < n - x + 1.0 ) in ScHypGeomDist()
1806 lcl_PutFactorialElements( cnNumer, 1.0, N - M - n + x, N - M + 1.0 ); in ScHypGeomDist()
1812 fCDenomUpper = n - x; in ScHypGeomDist()
1813 fCDenomVarLower = N - M - 2.0*(n - x) + 1.0; in ScHypGeomDist()
1834 if ( fCDenomUpper < n - x + 1.0 ) in ScHypGeomDist()
1836 lcl_PutFactorialElements( cnNumer, N - M - n + 1.0, N - M - n + x, N - M + 1.0 ); in ScHypGeomDist()
1840 fCDenomUpper = n - x; in ScHypGeomDist()
1841 fCDenomVarLower = N - M - 2.0*(n - x) + 1.0; in ScHypGeomDist()
1865 if ( n - x + 1.0 > fCDenomUpper ) in ScHypGeomDist()
1867 lcl_PutFactorialElements( cnNumer, 1.0, N - M - n + x, N - M + 1.0 ); in ScHypGeomDist()
1873 fCDenomVarLower = N - M - 2.0*(n - x) + 1.0; in ScHypGeomDist()
1874 fCDenomUpper = n - x; in ScHypGeomDist()
1881 DBG_ASSERT( M >= n - x, "ScHypGeomDist: wrong assertion" ); in ScHypGeomDist()
1882 DBG_ASSERT( M - x <= N - M + 1.0, "ScHypGeomDist: wrong assertion" ); in ScHypGeomDist()
1899 if ( n - x + 1.0 > fCDenomUpper ) in ScHypGeomDist()
1901 lcl_PutFactorialElements( cnNumer, N - 2.0*M + 1.0, N - M - n + x, N - M + 1.0 ); in ScHypGeomDist()
1906 fCDenomUpper = n - x; in ScHypGeomDist()
1907 fCDenomVarLower = N - M - 2.0*(n - x) + 1.0; in ScHypGeomDist()
1912 lcl_PutFactorialElements( cnDenom, fCDenomVarLower, N - n - 2.0*M + x, in ScHypGeomDist()
1913 N - n - M + x + 1.0 ); in ScHypGeomDist()
1915 fCDenomUpper = n - x; in ScHypGeomDist()
1916 fCDenomVarLower = N - M - 2.0*(n - x) + 1.0; in ScHypGeomDist()
1925 double nDNumVarUpper = fCDenomUpper < x + 1.0 ? n - x - 1.0 : n - fCDenomUpper - 1.0; in ScHypGeomDist()
1926 double nDDenomVarLower = fCDenomUpper < x + 1.0 ? fCDenomVarLower : N - n - M + 1.0; in ScHypGeomDist()
1928 lcl_PutFactorialElements( cnDenom, nDDenomVarLower, N - n - M + x, N - n - M + x + 1.0 ); in ScHypGeomDist()
1981 double x = GetDouble(); in ScNormInv() local
1982 if (sigma <= 0.0 || x < 0.0 || x > 1.0) in ScNormInv()
1984 else if (x == 0.0 || x == 1.0) in ScNormInv()
1987 PushDouble(gaussinv(x)*sigma + mue); in ScNormInv()
1994 double x = GetDouble(); in ScSNormInv() local
1995 if (x < 0.0 || x > 1.0) in ScSNormInv()
1997 else if (x == 0.0 || x == 1.0) in ScSNormInv()
2000 PushDouble(gaussinv(x)); in ScSNormInv()
2027 double GetValue( double x ) const { return fp - rInt.GetGammaDist(x, fAlpha, fBeta); } in GetValue()
2066 double GetValue( double x ) const { return fp - rInt.GetBetaDist(x, fAlpha, fBeta); } in GetValue()
2120 double GetValue( double x ) const { return fp - 2 * rInt.GetTDist(x, fDF); } in GetValue()
2153 double GetValue( double x ) const { return fp - rInt.GetFDist(x, fF1, fF2); } in GetValue()
2187 double GetValue( double x ) const { return fp - rInt.GetChiDist(x, fDF); } in GetValue()
2221 double GetValue( double x ) const { return fp - rInt.GetChiSqDistCDF(x, fDF); } in GetValue()
2267 double sigma = 0.0, mue, x; in ScZTest() local
2277 x = GetDouble(); in ScZTest()
2374 PushDouble(0.5 - gauss((mue-x)/sqrt(sigma/rValCount))); in ScZTest()
2377 PushDouble(0.5 - gauss((mue-x)*sqrt(rValCount)/sigma)); in ScZTest()
2740 double x = GetDouble(); in ScHarMean() local
2741 if (x > 0.0) in ScHarMean()
2743 nVal += 1.0/x; in ScHarMean()
2756 double x = GetCellValue( aAdr, pCell ); in ScHarMean() local
2757 if (x > 0.0) in ScHarMean()
2759 nVal += 1.0/x; in ScHarMean()
2808 double x = pMat->GetDouble(nElem); in ScHarMean() local
2809 if (x > 0.0) in ScHarMean()
2811 nVal += 1.0/x; in ScHarMean()
2823 double x = pMat->GetDouble(nElem); in ScHarMean() local
2824 if (x > 0.0) in ScHarMean()
2826 nVal += 1.0/x; in ScHarMean()
2861 double x = GetDouble(); in ScGeoMean() local
2862 if (x > 0.0) in ScGeoMean()
2864 nVal += log(x); in ScGeoMean()
2877 double x = GetCellValue( aAdr, pCell ); in ScGeoMean() local
2878 if (x > 0.0) in ScGeoMean()
2880 nVal += log(x); in ScGeoMean()
2929 double x = pMat->GetDouble(ui); in ScGeoMean() local
2930 if (x > 0.0) in ScGeoMean()
2932 nVal += log(x); in ScGeoMean()
2944 double x = pMat->GetDouble(ui); in ScGeoMean() local
2945 if (x > 0.0) in ScGeoMean()
2947 nVal += log(x); in ScGeoMean()
2973 double x = GetDouble(); in ScStandard() local
2979 PushDouble((x-mue)/sigma); in ScStandard()
3603 double x = GetDouble(); in ScRank() local
3605 if (x == fVal) in ScRank()
3617 double x = GetCellValue( aAdr, pCell ); in ScRank() local
3618 if (x == fVal) in ScRank()
3674 double x = pMat->GetDouble(i); in ScRank() local
3675 if (x == fVal) in ScRank()
3677 else if ((!bDescending && x > fVal) || in ScRank()
3678 (bDescending && x < fVal) ) in ScRank()
3687 double x = pMat->GetDouble(i); in ScRank() local
3688 if (x == fVal) in ScRank()
3690 else if ((!bDescending && x > fVal) || in ScRank()
3691 (bDescending && x < fVal) ) in ScRank()