diff options
author | Eike Rathke <erack@redhat.com> | 2017-02-13 18:22:28 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-02-13 18:26:42 +0100 |
commit | 1a1dbff33db8a6f2f55a5d92483a03670a610f6a (patch) | |
tree | e403f6f45a21a807c2deb64c941ddd66ae44261d /sc | |
parent | 3ee77072ff774dccd38edc03e8714a39e586f94a (diff) |
get rid of boost::math::log1p() and use rtl::math::log1p()
... which in turn uses the compiler's std::log1p()
Change-Id: I8878cc31dd4b0c16b04f15822cfbe665e4156109
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/interpr2.cxx | 7 | ||||
-rw-r--r-- | sc/source/core/tool/interpr3.cxx | 5 |
2 files changed, 5 insertions, 7 deletions
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx index 85f2307cdf2b..0f2f5b13ef23 100644 --- a/sc/source/core/tool/interpr2.cxx +++ b/sc/source/core/tool/interpr2.cxx @@ -27,7 +27,6 @@ #include <svl/zforlist.hxx> #include <svl/sharedstringpool.hxx> #include <sal/macros.h> -#include <boost/math/special_functions/log1p.hpp> #include "attrib.hxx" #include "sc.hrc" @@ -1855,7 +1854,7 @@ void ScInterpreter::ScPDuration() double nFuture = GetDouble(); double nPresent = GetDouble(); double nInterest = GetDouble(); - PushDouble(log(nFuture / nPresent) / boost::math::log1p(nInterest)); + PushDouble(log(nFuture / nPresent) / rtl::math::log1p(nInterest)); } } @@ -1972,9 +1971,9 @@ void ScInterpreter::ScNper() PushDouble(-(nBw + nZw)/nRmz); else if (bPayInAdvance) PushDouble(log(-(nInterest*nZw-nRmz*(1.0+nInterest))/(nInterest*nBw+nRmz*(1.0+nInterest))) - /boost::math::log1p(nInterest)); + / rtl::math::log1p(nInterest)); else - PushDouble(log(-(nInterest*nZw-nRmz)/(nInterest*nBw+nRmz))/boost::math::log1p(nInterest)); + PushDouble(log(-(nInterest*nZw-nRmz)/(nInterest*nBw+nRmz)) / rtl::math::log1p(nInterest)); } bool ScInterpreter::RateIteration( double fNper, double fPayment, double fPv, diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx index 033763f5c6a7..a6ef36661e0d 100644 --- a/sc/source/core/tool/interpr3.cxx +++ b/sc/source/core/tool/interpr3.cxx @@ -34,7 +34,6 @@ #include <math.h> #include <vector> #include <algorithm> -#include <boost/math/special_functions/log1p.hpp> #include <comphelper/random.hxx> using ::std::vector; @@ -588,7 +587,7 @@ double ScInterpreter::GetGamma(double fZ) if (fZ >= -0.5) // shift to x>=1, might overflow { - double fLogTest = lcl_GetLogGammaHelper(fZ+2) - boost::math::log1p(fZ) - log( fabs(fZ)); + double fLogTest = lcl_GetLogGammaHelper(fZ+2) - rtl::math::log1p(fZ) - log( fabs(fZ)); if (fLogTest >= fLogDblMax) { SetError( FormulaError::IllegalFPOperation); @@ -621,7 +620,7 @@ double ScInterpreter::GetLogGamma(double fZ) return log(lcl_GetGammaHelper(fZ)); if (fZ >= 0.5) return log( lcl_GetGammaHelper(fZ+1) / fZ); - return lcl_GetLogGammaHelper(fZ+2) - boost::math::log1p(fZ) - log(fZ); + return lcl_GetLogGammaHelper(fZ+2) - rtl::math::log1p(fZ) - log(fZ); } double ScInterpreter::GetFDist(double x, double fF1, double fF2) |