diff options
author | dante <dante19031999@gmail.com> | 2021-05-04 11:54:55 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-05-04 14:38:38 +0200 |
commit | 021ec9bb9ffa6ae8fbb73c2f6ea4bc0b8df9ddef (patch) | |
tree | 9dcb67c1a3859801c30b00c8974c2fe3406223e1 /sc | |
parent | dc4b4137520645495d1a7ead9744f515f53e5c84 (diff) |
Algebraic simplification
Change-Id: I695419778e378eb4bd0eac70930b41d6e668033c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115066
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/interpr2.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
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 ); } |