This is an automated email from the ASF dual-hosted git repository. asf-gitbox-commits pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/openoffice.git
commit 399b70361c25480720d82695f8ce7ae7c093dfe4 Author: Pedro Giffuni <[email protected]> AuthorDate: Sun Sep 6 17:54:48 2026 -0500 calc: some uses for C++11 expm1 Just better use of <cmath> Tested on FreeBSD --- main/sc/source/core/tool/interpr3.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/sc/source/core/tool/interpr3.cxx b/main/sc/source/core/tool/interpr3.cxx index a1e3f3919e..b327c2f8cb 100644 --- a/main/sc/source/core/tool/interpr3.cxx +++ b/main/sc/source/core/tool/interpr3.cxx @@ -1558,7 +1558,7 @@ void ScInterpreter::ScExpDist() else // Verteilung { if (x > 0.0) - PushDouble(1.0 - exp(-lambda*x)); + PushDouble(-expm1(-lambda*x)); else PushInt(0); } @@ -1638,7 +1638,7 @@ void ScInterpreter::ScWeibull() PushDouble(alpha/pow(beta,alpha)*pow(x,alpha-1.0)* exp(-pow(x/beta,alpha))); else // Verteilung - PushDouble(1.0 - exp(-pow(x/beta,alpha))); + PushDouble(-expm1(-pow(x/beta,alpha))); } }
