[Libreoffice-commits] core.git: 2 commits - sc/source

Tor Lillqvist tml at collabora.com
Wed Jan 28 05:41:32 PST 2015


 sc/source/core/inc/interpre.hxx        |    7 ++++++-
 sc/source/ui/optdlg/calcoptionsdlg.cxx |    7 +++++++
 2 files changed, 13 insertions(+), 1 deletion(-)

New commits:
commit 0f0f0d8cba53d1a0bd7505e15989dd12f96c30fe
Author: Tor Lillqvist <tml at collabora.com>
Date:   Wed Jan 28 15:38:05 2015 +0200

    Add NORMSINV test
    
    Change-Id: I0acdc5012a89d90cab6b30fe26b321d956982586

diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx b/sc/source/ui/optdlg/calcoptionsdlg.cxx
index 1b3e13ac1..f816ab4 100644
--- a/sc/source/ui/optdlg/calcoptionsdlg.cxx
+++ b/sc/source/ui/optdlg/calcoptionsdlg.cxx
@@ -16,6 +16,7 @@
 #include "calcoptionsdlg.hxx"
 #include "docfunc.hxx"
 #include "docsh.hxx"
+#include "interpre.hxx"
 #include "sc.hrc"
 #include "scresid.hxx"
 #include "scopetools.hxx"
@@ -622,6 +623,12 @@ IMPL_LINK( ScCalcOptionsDialog, TestClickHdl, PushButton*, )
                                     return (nArg == 0);
                                 }));
 
+    xTestDocument->addTest(UnOp("NormSInv", "NORMSINV", 0, 1, 3e-10,
+                                [] (double nArg)
+                                {
+                                    return ScInterpreter::gaussinv(nArg);
+                                }));
+
     xTestDocument->addTest(Reduction("Sum", "SUM", 100, 0, -1000, 1000, 3e-10,
                                      [] (double nAccum, double nArg)
                                      {
commit 328ddd2154061aaff7e1292a6976ccd3d210aef4
Author: Tor Lillqvist <tml at collabora.com>
Date:   Wed Jan 28 15:35:21 2015 +0200

    Make gaussinv() static and public
    
    It does not access any member so can be static. It is needed in the OpenCL
    test spreadsheet to verify the results from the OpenCL implenentation of
    NORMSINV.
    
    Change-Id: I72c1f6e6c0c04c0e25f4779ab334158b8d4e371d

diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx
index 50864c3..6f9e1e6 100644
--- a/sc/source/core/inc/interpre.hxx
+++ b/sc/source/core/inc/interpre.hxx
@@ -26,6 +26,7 @@
 #include <formula/errorcodes.hxx>
 #include <formula/tokenarray.hxx>
 #include "scdll.hxx"
+#include "scdllapi.h"
 #include "types.hxx"
 #include "externalrefmgr.hxx"
 #include "calcconfig.hxx"
@@ -740,7 +741,11 @@ double phi(double x);
 double integralPhi(double x);
 double taylor(const double* pPolynom, sal_uInt16 nMax, double x);
 double gauss(double x);
-double gaussinv(double x);
+
+public:
+static SC_DLLPUBLIC double gaussinv(double x);
+
+private:
 double GetBetaDist(double x, double alpha, double beta);  //cumulative distribution function
 double GetBetaDistPDF(double fX, double fA, double fB); //probability density function)
 double GetChiDist(double fChi, double fDF);     // for LEGACY.CHIDIST, returns right tail


More information about the Libreoffice-commits mailing list