[Libreoffice-commits] core.git: sc/source
dante (via logerrit)
logerrit at kemper.freedesktop.org
Tue May 4 12:39:17 UTC 2021
sc/source/core/tool/interpr2.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 021ec9bb9ffa6ae8fbb73c2f6ea4bc0b8df9ddef
Author: dante <dante19031999 at gmail.com>
AuthorDate: Tue May 4 11:54:55 2021 +0200
Commit: Mike Kaganski <mike.kaganski at 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.kaganski at 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 );
}
More information about the Libreoffice-commits
mailing list