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)