| commit | 112c9d4b2d8a6393f52697c928e8ace06782b6e0 | [log] |
|---|---|---|
| author | dante <dante19031999@gmail.com> | Tue May 11 11:39:11 2021 +0200 |
| committer | Mike Kaganski <mike.kaganski@collabora.com> | Sat May 15 08:23:08 2021 +0200 |
| tree | acd26f60b874aa706517dd1828dd0de5e613628b | |
| parent | 7beb507edbf94627c639483175be730f38f90dcd [diff] |
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@collabora.com>
diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx index 3354488..e8937f4 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)