[gnumeric] SNORM.DIST.RANGE: Renamed from r.pnorm2



commit c2c2cbc0a0e229f32fafde50ca88e72938636298
Author: Morten Welinder <terra gnome org>
Date:   Mon May 27 19:02:46 2013 -0400

    SNORM.DIST.RANGE: Renamed from r.pnorm2

 NEWS                          |    8 +++--
 plugins/fn-r/functions.c      |   80 -----------------------------------------
 plugins/fn-r/generate         |    6 +--
 plugins/fn-r/plugin.xml.in    |    1 -
 plugins/fn-stat/functions.c   |   23 ++++++++++++
 plugins/fn-stat/plugin.xml.in |    1 +
 6 files changed, 31 insertions(+), 88 deletions(-)
---
diff --git a/NEWS b/NEWS
index bed09fe..91f781a 100644
--- a/NEWS
+++ b/NEWS
@@ -9,7 +9,8 @@ Andreas:
        * Do not include hidden cells in automatic print range. [#700994]
        * Make buttons 1 and 2 behave similarly when selecting cells. [#700792]
        * Warn when encountering extLst in xlsx import. [#700018]
-       * Use ctrl-a only to select the whole sheet, if the sheet has focus. [#699746]
+       * Use ctrl-a only to select the whole sheet, if the sheet
+         has focus. [#699746]
 
 Darrell Tangman:
        * Update documentation for Edit and Insert menus. [#700596]
@@ -17,7 +18,8 @@ Darrell Tangman:
        * Consolidate comment, hyperlinks, names documentation.
 
 Jean:
-       * Adjust labels vertical alignment in document properties dialog. [#700156]
+       * Adjust labels vertical alignment in document properties
+         dialog. [#700156]
 
 Morten:
        * Improve xlsx import of style-only cells.
@@ -32,7 +34,7 @@ Morten:
        * Add new R.PTUKEY function.  [#700132]
        * Add new Q.PTUKEY function.  [#700132]
        * Fix missing translation of certain function examples.
-       * Add new R.PNORM2 function.
+       * Add new SNORM.DIST.RANGE function.
        * Fix critical when last row deleted.
 
 --------------------------------------------------------------------------
diff --git a/plugins/fn-r/functions.c b/plugins/fn-r/functions.c
index c509178..8bd8dcf 100644
--- a/plugins/fn-r/functions.c
+++ b/plugins/fn-r/functions.c
@@ -14,7 +14,6 @@ GNM_PLUGIN_MODULE_HEADER;
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_dnorm[] = {
        { GNM_FUNC_HELP_NAME, F_("R.DNORM:probability density function of the normal distribution") },
        { GNM_FUNC_HELP_ARG, F_("x:observation") },
@@ -39,7 +38,6 @@ gnumeric_r_dnorm (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_pnorm[] = {
        { GNM_FUNC_HELP_NAME, F_("R.PNORM:cumulative distribution function of the normal distribution") },
        { GNM_FUNC_HELP_ARG, F_("x:observation") },
@@ -66,27 +64,6 @@ gnumeric_r_pnorm (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
-static GnmFuncHelp const help_r_pnorm2[] = {
-       { GNM_FUNC_HELP_NAME, F_("R.PNORM2:cumulative distribution function of the normal distribution") },
-       { GNM_FUNC_HELP_ARG, F_("x1:first observation") },
-       { GNM_FUNC_HELP_ARG, F_("x2:first observation") },
-       { GNM_FUNC_HELP_DESCRIPTION, F_("This function returns the cumulative distribution function of the 
normal distribution.") },
-       { GNM_FUNC_HELP_END }
-};
-
-static GnmValue *
-gnumeric_r_pnorm2 (GnmFuncEvalInfo *ei, GnmValue const * const *args)
-{
-       gnm_float x1 = value_get_as_float (args[0]);
-       gnm_float x2 = value_get_as_float (args[1]);
-
-       return value_new_float (pnorm2 (x1, x2));
-}
-
-/* ------------------------------------------------------------------------- */
-
-
 static GnmFuncHelp const help_r_qnorm[] = {
        { GNM_FUNC_HELP_NAME, F_("R.QNORM:probability quantile function of the normal distribution") },
        { GNM_FUNC_HELP_ARG, F_("p:probability") },
@@ -113,7 +90,6 @@ gnumeric_r_qnorm (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_dlnorm[] = {
        { GNM_FUNC_HELP_NAME, F_("R.DLNORM:probability density function of the log-normal distribution") },
        { GNM_FUNC_HELP_ARG, F_("x:observation") },
@@ -138,7 +114,6 @@ gnumeric_r_dlnorm (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_plnorm[] = {
        { GNM_FUNC_HELP_NAME, F_("R.PLNORM:cumulative distribution function of the log-normal distribution") 
},
        { GNM_FUNC_HELP_ARG, F_("x:observation") },
@@ -165,7 +140,6 @@ gnumeric_r_plnorm (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_qlnorm[] = {
        { GNM_FUNC_HELP_NAME, F_("R.QLNORM:probability quantile function of the log-normal distribution") },
        { GNM_FUNC_HELP_ARG, F_("p:probability") },
@@ -192,7 +166,6 @@ gnumeric_r_qlnorm (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_dgamma[] = {
        { GNM_FUNC_HELP_NAME, F_("R.DGAMMA:probability density function of the gamma distribution") },
        { GNM_FUNC_HELP_ARG, F_("x:observation") },
@@ -217,7 +190,6 @@ gnumeric_r_dgamma (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_pgamma[] = {
        { GNM_FUNC_HELP_NAME, F_("R.PGAMMA:cumulative distribution function of the gamma distribution") },
        { GNM_FUNC_HELP_ARG, F_("x:observation") },
@@ -244,7 +216,6 @@ gnumeric_r_pgamma (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_qgamma[] = {
        { GNM_FUNC_HELP_NAME, F_("R.QGAMMA:probability quantile function of the gamma distribution") },
        { GNM_FUNC_HELP_ARG, F_("p:probability") },
@@ -271,7 +242,6 @@ gnumeric_r_qgamma (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_dbeta[] = {
        { GNM_FUNC_HELP_NAME, F_("R.DBETA:probability density function of the beta distribution") },
        { GNM_FUNC_HELP_ARG, F_("x:observation") },
@@ -296,7 +266,6 @@ gnumeric_r_dbeta (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_pbeta[] = {
        { GNM_FUNC_HELP_NAME, F_("R.PBETA:cumulative distribution function of the beta distribution") },
        { GNM_FUNC_HELP_ARG, F_("x:observation") },
@@ -323,7 +292,6 @@ gnumeric_r_pbeta (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_qbeta[] = {
        { GNM_FUNC_HELP_NAME, F_("R.QBETA:probability quantile function of the beta distribution") },
        { GNM_FUNC_HELP_ARG, F_("p:probability") },
@@ -350,7 +318,6 @@ gnumeric_r_qbeta (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_dt[] = {
        { GNM_FUNC_HELP_NAME, F_("R.DT:probability density function of the Student t distribution") },
        { GNM_FUNC_HELP_ARG, F_("x:observation") },
@@ -373,7 +340,6 @@ gnumeric_r_dt (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_pt[] = {
        { GNM_FUNC_HELP_NAME, F_("R.PT:cumulative distribution function of the Student t distribution") },
        { GNM_FUNC_HELP_ARG, F_("x:observation") },
@@ -398,7 +364,6 @@ gnumeric_r_pt (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_qt[] = {
        { GNM_FUNC_HELP_NAME, F_("R.QT:probability quantile function of the Student t distribution") },
        { GNM_FUNC_HELP_ARG, F_("p:probability") },
@@ -423,7 +388,6 @@ gnumeric_r_qt (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_df[] = {
        { GNM_FUNC_HELP_NAME, F_("R.DF:probability density function of the F distribution") },
        { GNM_FUNC_HELP_ARG, F_("x:observation") },
@@ -448,7 +412,6 @@ gnumeric_r_df (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_pf[] = {
        { GNM_FUNC_HELP_NAME, F_("R.PF:cumulative distribution function of the F distribution") },
        { GNM_FUNC_HELP_ARG, F_("x:observation") },
@@ -475,7 +438,6 @@ gnumeric_r_pf (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_qf[] = {
        { GNM_FUNC_HELP_NAME, F_("R.QF:probability quantile function of the F distribution") },
        { GNM_FUNC_HELP_ARG, F_("p:probability") },
@@ -502,7 +464,6 @@ gnumeric_r_qf (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_dchisq[] = {
        { GNM_FUNC_HELP_NAME, F_("R.DCHISQ:probability density function of the chi-square distribution") },
        { GNM_FUNC_HELP_ARG, F_("x:observation") },
@@ -526,7 +487,6 @@ gnumeric_r_dchisq (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_pchisq[] = {
        { GNM_FUNC_HELP_NAME, F_("R.PCHISQ:cumulative distribution function of the chi-square distribution") 
},
        { GNM_FUNC_HELP_ARG, F_("x:observation") },
@@ -552,7 +512,6 @@ gnumeric_r_pchisq (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_qchisq[] = {
        { GNM_FUNC_HELP_NAME, F_("R.QCHISQ:probability quantile function of the chi-square distribution") },
        { GNM_FUNC_HELP_ARG, F_("p:probability") },
@@ -578,7 +537,6 @@ gnumeric_r_qchisq (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_dweibull[] = {
        { GNM_FUNC_HELP_NAME, F_("R.DWEIBULL:probability density function of the Weibull distribution") },
        { GNM_FUNC_HELP_ARG, F_("x:observation") },
@@ -603,7 +561,6 @@ gnumeric_r_dweibull (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_pweibull[] = {
        { GNM_FUNC_HELP_NAME, F_("R.PWEIBULL:cumulative distribution function of the Weibull distribution") },
        { GNM_FUNC_HELP_ARG, F_("x:observation") },
@@ -630,7 +587,6 @@ gnumeric_r_pweibull (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_qweibull[] = {
        { GNM_FUNC_HELP_NAME, F_("R.QWEIBULL:probability quantile function of the Weibull distribution") },
        { GNM_FUNC_HELP_ARG, F_("p:probability") },
@@ -657,7 +613,6 @@ gnumeric_r_qweibull (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_dpois[] = {
        { GNM_FUNC_HELP_NAME, F_("R.DPOIS:probability density function of the Poisson distribution") },
        { GNM_FUNC_HELP_ARG, F_("x:observation") },
@@ -680,7 +635,6 @@ gnumeric_r_dpois (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_ppois[] = {
        { GNM_FUNC_HELP_NAME, F_("R.PPOIS:cumulative distribution function of the Poisson distribution") },
        { GNM_FUNC_HELP_ARG, F_("x:observation") },
@@ -705,7 +659,6 @@ gnumeric_r_ppois (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_qpois[] = {
        { GNM_FUNC_HELP_NAME, F_("R.QPOIS:probability quantile function of the Poisson distribution") },
        { GNM_FUNC_HELP_ARG, F_("p:probability") },
@@ -730,7 +683,6 @@ gnumeric_r_qpois (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_dexp[] = {
        { GNM_FUNC_HELP_NAME, F_("R.DEXP:probability density function of the exponential distribution") },
        { GNM_FUNC_HELP_ARG, F_("x:observation") },
@@ -753,7 +705,6 @@ gnumeric_r_dexp (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_pexp[] = {
        { GNM_FUNC_HELP_NAME, F_("R.PEXP:cumulative distribution function of the exponential distribution") },
        { GNM_FUNC_HELP_ARG, F_("x:observation") },
@@ -778,7 +729,6 @@ gnumeric_r_pexp (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_qexp[] = {
        { GNM_FUNC_HELP_NAME, F_("R.QEXP:probability quantile function of the exponential distribution") },
        { GNM_FUNC_HELP_ARG, F_("p:probability") },
@@ -803,7 +753,6 @@ gnumeric_r_qexp (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_dbinom[] = {
        { GNM_FUNC_HELP_NAME, F_("R.DBINOM:probability density function of the binomial distribution") },
        { GNM_FUNC_HELP_ARG, F_("x:observation") },
@@ -828,7 +777,6 @@ gnumeric_r_dbinom (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_pbinom[] = {
        { GNM_FUNC_HELP_NAME, F_("R.PBINOM:cumulative distribution function of the binomial distribution") },
        { GNM_FUNC_HELP_ARG, F_("x:observation") },
@@ -855,7 +803,6 @@ gnumeric_r_pbinom (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_qbinom[] = {
        { GNM_FUNC_HELP_NAME, F_("R.QBINOM:probability quantile function of the binomial distribution") },
        { GNM_FUNC_HELP_ARG, F_("p:probability") },
@@ -882,7 +829,6 @@ gnumeric_r_qbinom (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_dnbinom[] = {
        { GNM_FUNC_HELP_NAME, F_("R.DNBINOM:probability density function of the negative binomial 
distribution") },
        { GNM_FUNC_HELP_ARG, F_("x:observation") },
@@ -907,7 +853,6 @@ gnumeric_r_dnbinom (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_pnbinom[] = {
        { GNM_FUNC_HELP_NAME, F_("R.PNBINOM:cumulative distribution function of the negative binomial 
distribution") },
        { GNM_FUNC_HELP_ARG, F_("x:observation") },
@@ -934,7 +879,6 @@ gnumeric_r_pnbinom (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_qnbinom[] = {
        { GNM_FUNC_HELP_NAME, F_("R.QNBINOM:probability quantile function of the negative binomial 
distribution") },
        { GNM_FUNC_HELP_ARG, F_("p:probability") },
@@ -961,7 +905,6 @@ gnumeric_r_qnbinom (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_dhyper[] = {
        { GNM_FUNC_HELP_NAME, F_("R.DHYPER:probability density function of the hypergeometric distribution") 
},
        { GNM_FUNC_HELP_ARG, F_("x:observation") },
@@ -988,7 +931,6 @@ gnumeric_r_dhyper (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_phyper[] = {
        { GNM_FUNC_HELP_NAME, F_("R.PHYPER:cumulative distribution function of the hypergeometric 
distribution") },
        { GNM_FUNC_HELP_ARG, F_("x:observation") },
@@ -1017,7 +959,6 @@ gnumeric_r_phyper (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_qhyper[] = {
        { GNM_FUNC_HELP_NAME, F_("R.QHYPER:probability quantile function of the hypergeometric distribution") 
},
        { GNM_FUNC_HELP_ARG, F_("p:probability") },
@@ -1046,7 +987,6 @@ gnumeric_r_qhyper (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_dgeom[] = {
        { GNM_FUNC_HELP_NAME, F_("R.DGEOM:probability density function of the geometric distribution") },
        { GNM_FUNC_HELP_ARG, F_("x:observation") },
@@ -1069,7 +1009,6 @@ gnumeric_r_dgeom (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_pgeom[] = {
        { GNM_FUNC_HELP_NAME, F_("R.PGEOM:cumulative distribution function of the geometric distribution") },
        { GNM_FUNC_HELP_ARG, F_("x:observation") },
@@ -1094,7 +1033,6 @@ gnumeric_r_pgeom (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_qgeom[] = {
        { GNM_FUNC_HELP_NAME, F_("R.QGEOM:probability quantile function of the geometric distribution") },
        { GNM_FUNC_HELP_ARG, F_("p:probability") },
@@ -1119,7 +1057,6 @@ gnumeric_r_qgeom (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_dcauchy[] = {
        { GNM_FUNC_HELP_NAME, F_("R.DCAUCHY:probability density function of the Cauchy distribution") },
        { GNM_FUNC_HELP_ARG, F_("x:observation") },
@@ -1144,7 +1081,6 @@ gnumeric_r_dcauchy (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_pcauchy[] = {
        { GNM_FUNC_HELP_NAME, F_("R.PCAUCHY:cumulative distribution function of the Cauchy distribution") },
        { GNM_FUNC_HELP_ARG, F_("x:observation") },
@@ -1171,7 +1107,6 @@ gnumeric_r_pcauchy (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_ptukey[] = {
        { GNM_FUNC_HELP_NAME, F_("R.PTUKEY:cumulative distribution function of the Studentized range 
distribution") },
        { GNM_FUNC_HELP_ARG, F_("x:observation") },
@@ -1200,7 +1135,6 @@ gnumeric_r_ptukey (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_qtukey[] = {
        { GNM_FUNC_HELP_NAME, F_("R.QTUKEY:probability quantile function of the Studentized range 
distribution") },
        { GNM_FUNC_HELP_ARG, F_("p:probability") },
@@ -1229,7 +1163,6 @@ gnumeric_r_qtukey (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_qcauchy[] = {
        { GNM_FUNC_HELP_NAME, F_("R.QCAUCHY:probability quantile function of the Cauchy distribution") },
        { GNM_FUNC_HELP_ARG, F_("p:probability") },
@@ -1256,7 +1189,6 @@ gnumeric_r_qcauchy (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_dsnorm[] = {
        { GNM_FUNC_HELP_NAME, F_("R.DSNORM:probability density function of the skew-normal distribution") },
        { GNM_FUNC_HELP_ARG, F_("x:observation") },
@@ -1283,7 +1215,6 @@ gnumeric_r_dsnorm (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_psnorm[] = {
        { GNM_FUNC_HELP_NAME, F_("R.PSNORM:cumulative distribution function of the skew-normal distribution") 
},
        { GNM_FUNC_HELP_ARG, F_("x:observation") },
@@ -1312,7 +1243,6 @@ gnumeric_r_psnorm (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_qsnorm[] = {
        { GNM_FUNC_HELP_NAME, F_("R.QSNORM:probability quantile function of the skew-normal distribution") },
        { GNM_FUNC_HELP_ARG, F_("p:probability") },
@@ -1341,7 +1271,6 @@ gnumeric_r_qsnorm (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_dst[] = {
        { GNM_FUNC_HELP_NAME, F_("R.DST:probability density function of the skew-t distribution") },
        { GNM_FUNC_HELP_ARG, F_("x:observation") },
@@ -1366,7 +1295,6 @@ gnumeric_r_dst (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_pst[] = {
        { GNM_FUNC_HELP_NAME, F_("R.PST:cumulative distribution function of the skew-t distribution") },
        { GNM_FUNC_HELP_ARG, F_("x:observation") },
@@ -1393,7 +1321,6 @@ gnumeric_r_pst (GnmFuncEvalInfo *ei, GnmValue const * const *args)
 
 /* ------------------------------------------------------------------------- */
 
-
 static GnmFuncHelp const help_r_qst[] = {
        { GNM_FUNC_HELP_NAME, F_("R.QST:probability quantile function of the skew-t distribution") },
        { GNM_FUNC_HELP_ARG, F_("p:probability") },
@@ -1448,13 +1375,6 @@ GnmFuncDescriptor const stat_functions[] = {
                GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
        },
        {
-               "r.pnorm2",
-               "ff",
-               help_r_pnorm2,
-               gnumeric_r_pnorm2, NULL, NULL, NULL,
-               GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
-       },
-       {
                "r.qnorm",
                "fff|bb",
                help_r_qnorm,
diff --git a/plugins/fn-r/generate b/plugins/fn-r/generate
index 00c62e2..6437495 100644
--- a/plugins/fn-r/generate
+++ b/plugins/fn-r/generate
@@ -27,13 +27,11 @@ my %defaults;
                  'scale' => "the scale parameter $of",
                  );
 
-    $funcs{'dnorm'} = $funcs{'pnorm'} = $funcs{'pnorm2'} = $funcs{'qnorm'} =
+    $funcs{'dnorm'} = $funcs{'pnorm'} = $funcs{'qnorm'} =
        [\&distribution,
         'normal',
         ({ 'mu' => "mean $of",
            'sigma' => "standard deviation $of",
-           'x1' => 'first observation',
-           'x2' => 'first observation',
            @common })];
 
     $funcs{'dlnorm'} = $funcs{'plnorm'} = $funcs{'qlnorm'} =
@@ -251,7 +249,7 @@ sub distribution {
     # Output help description.
 
     &emit_line ();
-    &emit ("\nstatic GnmFuncHelp const help_r_$func\[\] = {\n");
+    &emit ("static GnmFuncHelp const help_r_$func\[\] = {\n");
 
     my $short_what = ($func =~ /^d/
                      ? "probability density function"
diff --git a/plugins/fn-r/plugin.xml.in b/plugins/fn-r/plugin.xml.in
index e360c2f..bea2448 100644
--- a/plugins/fn-r/plugin.xml.in
+++ b/plugins/fn-r/plugin.xml.in
@@ -40,7 +40,6 @@
                                <function name="r.plnorm"/>
                                <function name="r.pnbinom"/>
                                <function name="r.pnorm"/>
-                               <function name="r.pnorm2"/>
                                <function name="r.ppois"/>
                                <function name="r.psnorm"/>
                                <function name="r.pst"/>
diff --git a/plugins/fn-stat/functions.c b/plugins/fn-stat/functions.c
index ed11b13..dbbc9e3 100644
--- a/plugins/fn-stat/functions.c
+++ b/plugins/fn-stat/functions.c
@@ -456,6 +456,25 @@ gnumeric_normsdist (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
 
 /***************************************************************************/
 
+static GnmFuncHelp const help_snorm_dist_range[] = {
+       { GNM_FUNC_HELP_NAME, F_("SNORM.DIST.RANGE:probability of the standard normal distribution over an 
interval") },
+       { GNM_FUNC_HELP_ARG, F_("x1:first observation") },
+       { GNM_FUNC_HELP_ARG, F_("x2:first observation") },
+       { GNM_FUNC_HELP_DESCRIPTION, F_("This function returns the cumulative probability over a range of the 
standard normal distribution.") },
+       { GNM_FUNC_HELP_END }
+};
+
+static GnmValue *
+gnumeric_snorm_dist_range (GnmFuncEvalInfo *ei, GnmValue const * const *args)
+{
+       gnm_float x1 = value_get_as_float (args[0]);
+       gnm_float x2 = value_get_as_float (args[1]);
+
+       return value_new_float (pnorm2 (x1, x2));
+}
+
+/* ------------------------------------------------------------------------- */
+
 static GnmFuncHelp const help_normsinv[] = {
        { GNM_FUNC_HELP_NAME, F_("NORMSINV:inverse of the cumulative distribution function of the standard 
normal distribution")},
        { GNM_FUNC_HELP_ARG, F_("p:given probability")},
@@ -5154,6 +5173,10 @@ GnmFuncDescriptor const stat_functions[] = {
        { "normdist",     "fffb",
          help_normdist, gnumeric_normdist, NULL, NULL, NULL,
          GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
+       { "snorm.dist.range", "ff",
+         help_snorm_dist_range, gnumeric_snorm_dist_range, NULL, NULL, NULL,
+         GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE,
+       },
        { "norminv",      "fff",
          help_norminv, gnumeric_norminv, NULL, NULL, NULL,
          GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_COMPLETE, GNM_FUNC_TEST_STATUS_BASIC },
diff --git a/plugins/fn-stat/plugin.xml.in b/plugins/fn-stat/plugin.xml.in
index c66c023..c231877 100644
--- a/plugins/fn-stat/plugin.xml.in
+++ b/plugins/fn-stat/plugin.xml.in
@@ -75,6 +75,7 @@
                                <function name="normdist"/>
                                <function name="norminv"/>
                                <function name="normsdist"/>
+                               <function name="snorm.dist.range"/>
                                <function name="normsinv"/>
                                <function name="owent"/>
                                <function name="pareto"/>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]