get rid of boost::math::log1p() and use rtl::math::log1p()
... which in turn uses the compiler's std::log1p() Change-Id: I8878cc31dd4b0c16b04f15822cfbe665e4156109
This commit is contained in:
@@ -27,7 +27,6 @@
|
|||||||
#include <svl/zforlist.hxx>
|
#include <svl/zforlist.hxx>
|
||||||
#include <svl/sharedstringpool.hxx>
|
#include <svl/sharedstringpool.hxx>
|
||||||
#include <sal/macros.h>
|
#include <sal/macros.h>
|
||||||
#include <boost/math/special_functions/log1p.hpp>
|
|
||||||
|
|
||||||
#include "attrib.hxx"
|
#include "attrib.hxx"
|
||||||
#include "sc.hrc"
|
#include "sc.hrc"
|
||||||
@@ -1855,7 +1854,7 @@ void ScInterpreter::ScPDuration()
|
|||||||
double nFuture = GetDouble();
|
double nFuture = GetDouble();
|
||||||
double nPresent = GetDouble();
|
double nPresent = GetDouble();
|
||||||
double nInterest = 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);
|
PushDouble(-(nBw + nZw)/nRmz);
|
||||||
else if (bPayInAdvance)
|
else if (bPayInAdvance)
|
||||||
PushDouble(log(-(nInterest*nZw-nRmz*(1.0+nInterest))/(nInterest*nBw+nRmz*(1.0+nInterest)))
|
PushDouble(log(-(nInterest*nZw-nRmz*(1.0+nInterest))/(nInterest*nBw+nRmz*(1.0+nInterest)))
|
||||||
/boost::math::log1p(nInterest));
|
/ rtl::math::log1p(nInterest));
|
||||||
else
|
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,
|
bool ScInterpreter::RateIteration( double fNper, double fPayment, double fPv,
|
||||||
|
@@ -34,7 +34,6 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <boost/math/special_functions/log1p.hpp>
|
|
||||||
#include <comphelper/random.hxx>
|
#include <comphelper/random.hxx>
|
||||||
|
|
||||||
using ::std::vector;
|
using ::std::vector;
|
||||||
@@ -588,7 +587,7 @@ double ScInterpreter::GetGamma(double fZ)
|
|||||||
|
|
||||||
if (fZ >= -0.5) // shift to x>=1, might overflow
|
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)
|
if (fLogTest >= fLogDblMax)
|
||||||
{
|
{
|
||||||
SetError( FormulaError::IllegalFPOperation);
|
SetError( FormulaError::IllegalFPOperation);
|
||||||
@@ -621,7 +620,7 @@ double ScInterpreter::GetLogGamma(double fZ)
|
|||||||
return log(lcl_GetGammaHelper(fZ));
|
return log(lcl_GetGammaHelper(fZ));
|
||||||
if (fZ >= 0.5)
|
if (fZ >= 0.5)
|
||||||
return log( lcl_GetGammaHelper(fZ+1) / fZ);
|
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)
|
double ScInterpreter::GetFDist(double x, double fF1, double fF2)
|
||||||
|
Reference in New Issue
Block a user