[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sc/source

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Thu Apr 29 19:32:33 UTC 2021


 sc/source/core/data/table4.cxx |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 80d111c948d1553e9e0015738289b471cfe137f1
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Thu Apr 29 13:19:43 2021 +0200
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Thu Apr 29 21:31:58 2021 +0200

    tdf#141970 Revert "tdf#129606: Round the mean of the two subtractions"
    
    This reverts commit d5ebe7c3089ab9f4d3fe0707169fc1ce024cdb70, and
    brings number of inexact values in testing back to lower numbers
    (see test document in the bug).
    
    Change-Id: I5cfb34b7260fc6e4866585af6a2a50e79696eea2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114861
    Tested-by: Mike Kaganski <mike.kaganski at collabora.com>
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
    (cherry picked from commit aa096331ba468f19951e43e2550105d4dcf50053)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114865
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index 392eb8847028..37f88e218193 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -208,8 +208,7 @@ double approxDiff( double a, double b )
     // tdf#129606: Limit precision to the 16th significant digit of the least precise argument.
     // Cf. mnMaxGeneralPrecision in sc/source/core/data/column3.cxx.
     const int nExpArg = static_cast<int>(floor(log10(std::max(aa, ab)))) - 15;
-    // Round the mean of the two subtractions
-    return rtl::math::round((c + d) / 2, -std::max(nExp, nExpArg));
+    return rtl::math::round(c, -std::max(nExp, nExpArg));
 }
 }
 


More information about the Libreoffice-commits mailing list