[Libreoffice-commits] core.git: sc/qa

I-Jui Sung (Ray) ray at multicorewareinc.com
Sun Nov 17 11:32:52 PST 2013


 sc/qa/unit/opencl-test.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit fabda86553e6ff9bb6dc03d88a1599245f54ac15
Author: I-Jui (Ray) Sung <ray at multicorewareinc.com>
Date:   Sun Nov 17 13:31:22 2013 -0600

    GPU Calc: add tolerance when expected == 0 for weibull
    
    Change-Id: I60cd4901f614f64d8bf28b2e5477edb00f5b9651

diff --git a/sc/qa/unit/opencl-test.cxx b/sc/qa/unit/opencl-test.cxx
index 987fc40..ed38b61 100644
--- a/sc/qa/unit/opencl-test.cxx
+++ b/sc/qa/unit/opencl-test.cxx
@@ -1788,7 +1788,8 @@ void ScOpenclTest::testStatisticalFormulaWeibull()
     {
         double fLibre = pDoc->GetValue(ScAddress(4,i,0));
         double fExcel = pDocRes->GetValue(ScAddress(4,i,0));
-        CPPUNIT_ASSERT_DOUBLES_EQUAL(fExcel, fLibre, fabs(0.0001*fExcel));
+        CPPUNIT_ASSERT_DOUBLES_EQUAL(fExcel, fLibre,
+            fExcel == 0?1e-4:fabs(1e-4*fExcel));
     }
     xDocSh->DoClose();
     xDocShRes->DoClose();


More information about the Libreoffice-commits mailing list