sc/source/core/tool/interpr5.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit ea704f00dea2c4fe0a229876993801ea83c3c4a1 Author: Stephan Bergmann <sberg...@redhat.com> Date: Wed Aug 17 13:10:50 2016 +0200 Avoid division by zero ...when i == 0. Change-Id: Iae1adbe559370bdba195afb74e83b5c94e5de4e2 diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx index 6cc80b3..2c357db 100644 --- a/sc/source/core/tool/interpr5.cxx +++ b/sc/source/core/tool/interpr5.cxx @@ -1657,7 +1657,7 @@ void ScInterpreter::ScPow() if (fVal1 < 0 && fVal2 != 0.0) { int i = (int) (1 / fVal2 + ((fVal2 < 0) ? -0.5 : 0.5)); - if (rtl::math::approxEqual(1 / ((double) i), fVal2) && i % 2 != 0) + if (i % 2 != 0 && rtl::math::approxEqual(1 / ((double) i), fVal2)) PushDouble(-pow(-fVal1, fVal2)); else PushDouble(pow(fVal1, fVal2)); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits