sc/source/core/tool/interpr2.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 021ec9bb9ffa6ae8fbb73c2f6ea4bc0b8df9ddef Author: dante <dante19031...@gmail.com> AuthorDate: Tue May 4 11:54:55 2021 +0200 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Tue May 4 14:38:38 2021 +0200 Algebraic simplification Change-Id: I695419778e378eb4bd0eac70930b41d6e668033c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115066 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx index a5e70066160f..a57d0b81789f 100644 --- a/sc/source/core/tool/interpr2.cxx +++ b/sc/source/core/tool/interpr2.cxx @@ -1005,7 +1005,7 @@ void ScInterpreter::ScRoundUp() void ScInterpreter::RoundSignificant( double fX, double fDigits, double &fRes ) { - double fTemp = ::rtl::math::approxFloor( log10( fX > 0 ? fX : -fX ) ) + 1.0 - fDigits; + double fTemp = ::rtl::math::approxFloor( log10( std::abs(fX) ) ) + 1.0 - fDigits; fRes = ::rtl::math::round( pow(10.0, -fTemp ) * fX ) * pow( 10.0, fTemp ); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits