[Libreoffice-commits] core.git: sc/source
dante (via logerrit)
logerrit at kemper.freedesktop.org
Sat May 15 06:23:50 UTC 2021
sc/source/core/tool/interpr3.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 112c9d4b2d8a6393f52697c928e8ace06782b6e0
Author: dante <dante19031999 at gmail.com>
AuthorDate: Tue May 11 11:39:11 2021 +0200
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Sat May 15 08:23:08 2021 +0200
tdf#137679 Use KahanSum for Taylor series
Change-Id: Ic399616e0af45443e54c708d2a5b7326a6bbd06e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115389
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx
index 3354488a88e4..e8937f4501e2 100644
--- a/sc/source/core/tool/interpr3.cxx
+++ b/sc/source/core/tool/interpr3.cxx
@@ -205,12 +205,12 @@ double ScInterpreter::integralPhi(double x)
double ScInterpreter::taylor(const double* pPolynom, sal_uInt16 nMax, double x)
{
- double nVal = pPolynom[nMax];
+ KahanSum nVal = pPolynom[nMax];
for (short i = nMax-1; i >= 0; i--)
{
- nVal = pPolynom[i] + (nVal * x);
+ nVal = (nVal * x) + pPolynom[i];
}
- return nVal;
+ return nVal.get();
}
double ScInterpreter::gauss(double x)
More information about the Libreoffice-commits
mailing list