[gnumeric] function documentation fixes
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] function documentation fixes
- Date: Mon, 14 Jun 2010 18:28:12 +0000 (UTC)
commit 079221c7bead065877b997672e1bdaf30516f63b
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date: Mon Jun 14 12:27:22 2010 -0600
function documentation fixes
2010-06-14 Andreas J. Guelzow <aguelzow pyrshep ca>
* src/func-builtin.c (help_if): fix argument description
* src/func.c (gnm_func_sanity_check1): add checks
2010-06-14 Andreas J. Guelzow <aguelzow pyrshep ca>
* functions.c: remove inconsistent periods, etc.
ChangeLog | 5 ++
plugins/fn-complex/ChangeLog | 6 ++-
plugins/fn-complex/functions.c | 2 +-
plugins/fn-date/ChangeLog | 4 ++
plugins/fn-date/functions.c | 6 +-
plugins/fn-derivatives/ChangeLog | 4 ++
plugins/fn-derivatives/options.c | 7 ++-
plugins/fn-financial/ChangeLog | 4 ++
plugins/fn-financial/functions.c | 5 +-
plugins/fn-logical/ChangeLog | 6 ++-
plugins/fn-logical/functions.c | 8 ++--
plugins/fn-stat/ChangeLog | 6 ++-
plugins/fn-stat/functions.c | 106 +++++++++++++++++++-------------------
plugins/fn-tsa/ChangeLog | 6 ++-
plugins/fn-tsa/functions.c | 22 ++++----
src/func-builtin.c | 6 +-
src/func.c | 11 ++++
17 files changed, 130 insertions(+), 84 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c1e0d5f..27c1b7f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-06-14 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * src/func-builtin.c (help_if): fix argument description
+ * src/func.c (gnm_func_sanity_check1): add checks
+
2010-06-14 Morten Welinder <terra gnome org>
* src/mathfunc.c (pbinom2): New function extracted from
diff --git a/plugins/fn-complex/ChangeLog b/plugins/fn-complex/ChangeLog
index 2848bfe..f500ba4 100644
--- a/plugins/fn-complex/ChangeLog
+++ b/plugins/fn-complex/ChangeLog
@@ -1,6 +1,10 @@
+2010-06-14 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * functions.c: remove inconsistent periods, etc.
+
2010-06-10 Andreas J. Guelzow <aguelzow pyrshep ca>
- * functions.c: remove superfluous spaces, inconsitent periods, etc.
+ * functions.c: remove superfluous spaces, inconsistent periods, etc.
2010-05-30 Morten Welinder <terra gnome org>
diff --git a/plugins/fn-complex/functions.c b/plugins/fn-complex/functions.c
index ac23dfd..434944d 100644
--- a/plugins/fn-complex/functions.c
+++ b/plugins/fn-complex/functions.c
@@ -81,7 +81,7 @@ static GnmFuncHelp const help_complex[] = {
{ GNM_FUNC_HELP_NAME, F_("COMPLEX:a complex number of the form @{x} + @{y} {i}") },
{ GNM_FUNC_HELP_ARG, F_("x:real part") },
{ GNM_FUNC_HELP_ARG, F_("y:imaginary part") },
- { GNM_FUNC_HELP_ARG, F_("i:the suffix for the complex number, either \"i\" or \"j\"; defaults to \"i\".") },
+ { GNM_FUNC_HELP_ARG, F_("i:the suffix for the complex number, either \"i\" or \"j\"; defaults to \"i\"") },
{ GNM_FUNC_HELP_NOTE, F_("If @{i} is neither \"i\" nor \"j\", COMPLEX returns #VALUE!") },
{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
{ GNM_FUNC_HELP_EXAMPLES, "=COMPLEX(1,-1)" },
diff --git a/plugins/fn-date/ChangeLog b/plugins/fn-date/ChangeLog
index f6c5402..3a44268 100644
--- a/plugins/fn-date/ChangeLog
+++ b/plugins/fn-date/ChangeLog
@@ -1,3 +1,7 @@
+2010-06-14 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * functions.c: remove inconsistent periods, etc.
+
2010-05-30 Morten Welinder <terra gnome org>
* Release 1.10.5
diff --git a/plugins/fn-date/functions.c b/plugins/fn-date/functions.c
index 3cef41f..cf3a459 100644
--- a/plugins/fn-date/functions.c
+++ b/plugins/fn-date/functions.c
@@ -467,7 +467,7 @@ gnumeric_timevalue (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
static GnmFuncHelp const help_hour[] = {
{ GNM_FUNC_HELP_NAME, F_("HOUR:compute hour part of fractional day")},
- { GNM_FUNC_HELP_ARG, F_("time:time of day as fractional day.")},
+ { GNM_FUNC_HELP_ARG, F_("time:time of day as fractional day")},
{ GNM_FUNC_HELP_DESCRIPTION, F_("The HOUR function computes the hour part of the fractional day given by @{time}.") },
{ GNM_FUNC_HELP_EXAMPLES, "=HOUR(TIME(12,30,2))" },
{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
@@ -490,7 +490,7 @@ gnumeric_hour (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
static GnmFuncHelp const help_minute[] = {
{ GNM_FUNC_HELP_NAME, F_("MINUTE:compute minute part of fractional day")},
- { GNM_FUNC_HELP_ARG, F_("time:time of day as fractional day.")},
+ { GNM_FUNC_HELP_ARG, F_("time:time of day as fractional day")},
{ GNM_FUNC_HELP_DESCRIPTION, F_("The MINUTE function computes the minute part of the fractional day given by @{time}.") },
{ GNM_FUNC_HELP_EXAMPLES, "=MINUTE(TIME(12,30,2))" },
{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
@@ -513,7 +513,7 @@ gnumeric_minute (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
static GnmFuncHelp const help_second[] = {
{ GNM_FUNC_HELP_NAME, F_("SECOND:compute seconds part of fractional day")},
- { GNM_FUNC_HELP_ARG, F_("time:time of day as fractional day.")},
+ { GNM_FUNC_HELP_ARG, F_("time:time of day as fractional day")},
{ GNM_FUNC_HELP_DESCRIPTION, F_("The SECOND function computes the seconds part of the fractional day given by @{time}.") },
{ GNM_FUNC_HELP_EXAMPLES, "=SECOND(TIME(12,30,2))" },
{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
diff --git a/plugins/fn-derivatives/ChangeLog b/plugins/fn-derivatives/ChangeLog
index eadfe9b..c51c64d 100644
--- a/plugins/fn-derivatives/ChangeLog
+++ b/plugins/fn-derivatives/ChangeLog
@@ -1,3 +1,7 @@
+2010-06-14 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * functions.c: remove inconsistent periods, etc.
+
2010-05-30 Morten Welinder <terra gnome org>
* Release 1.10.5
diff --git a/plugins/fn-derivatives/options.c b/plugins/fn-derivatives/options.c
index ef9763a..34d255e 100644
--- a/plugins/fn-derivatives/options.c
+++ b/plugins/fn-derivatives/options.c
@@ -1384,7 +1384,7 @@ opt_complex_chooser(GnmFuncEvalInfo *ei, GnmValue const * const *argv)
static GnmFuncHelp const help_opt_complex_chooser[] = {
{ GNM_FUNC_HELP_NAME, F_("OPT_COMPLEX_CHOOSER:theoretical price of a complex chooser option")},
DEF_ARG_SPOT,
- { GNM_FUNC_HELP_ARG, F_("strike_call:strike price, if exercised as a call option.")},
+ { GNM_FUNC_HELP_ARG, F_("strike_call:strike price, if exercised as a call option")},
{ GNM_FUNC_HELP_ARG, F_("strike_put:strike price, if exercised as a put option")},
{ GNM_FUNC_HELP_ARG, F_("time:time in years until the holder chooses a put or a call option")},
{ GNM_FUNC_HELP_ARG, F_("time_call:time in years to maturity of the call option if chosen")},
@@ -1484,15 +1484,16 @@ opt_on_options (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
static GnmFuncHelp const help_opt_on_options[] = {
{ GNM_FUNC_HELP_NAME, F_("OPT_ON_OPTIONS:theoretical price of options on options")},
- { GNM_FUNC_HELP_ARG, F_("type_flag:'cc' for calls on calls, 'cp' for calls on puts, and so on for 'pc', and 'pp'.")},
+ { GNM_FUNC_HELP_ARG, F_("type_flag:'cc' for calls on calls, 'cp' for calls on puts, and so on for 'pc', and 'pp'")},
DEF_ARG_SPOT,
{ GNM_FUNC_HELP_ARG, F_("strike1:strike price at which the option being valued is struck")},
{ GNM_FUNC_HELP_ARG, F_("strike2:strike price at which the underlying option is struck")},
{ GNM_FUNC_HELP_ARG, F_("time1:time in years to maturity of the option")},
{ GNM_FUNC_HELP_ARG, F_("time2:time in years to the maturity of the underlying option")},
DEF_ARG_RATE_RISKFREE_ANN,
- { GNM_FUNC_HELP_ARG, F_("cost_of_carry:net cost of holding the underlying asset of the underlying option (for common stocks, the risk free rate less the dividend yield)")},
+ { GNM_FUNC_HELP_ARG, F_("cost_of_carry:net cost of holding the underlying asset of the underlying option")},
{ GNM_FUNC_HELP_ARG, F_("volatility:annualized volatility in price of the underlying asset of the underlying option")},
+ { GNM_FUNC_HELP_NOTE, F_("For common stocks, @{cost_of_carry} is the risk free rate less the dividend yield.")},
{ GNM_FUNC_HELP_NOTE, F_("@{time2} \xe2\x89\xa5 @{time1}")},
{ GNM_FUNC_HELP_SEEALSO, "OPT_BS,OPT_BS_DELTA,OPT_BS_RHO,OPT_BS_THETA,OPT_BS_GAMMA"},
{ GNM_FUNC_HELP_END}
diff --git a/plugins/fn-financial/ChangeLog b/plugins/fn-financial/ChangeLog
index 014048d..587a889 100644
--- a/plugins/fn-financial/ChangeLog
+++ b/plugins/fn-financial/ChangeLog
@@ -1,3 +1,7 @@
+2010-06-14 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * functions.c: remove inconsistent periods, etc.
+
2010-06-11 Morten Welinder <terra gnome org>
* functions.c (gnumeric_fvschedule): Ignore blanks. (This is the
diff --git a/plugins/fn-financial/functions.c b/plugins/fn-financial/functions.c
index ecd41a3..c86cf31 100644
--- a/plugins/fn-financial/functions.c
+++ b/plugins/fn-financial/functions.c
@@ -2195,9 +2195,10 @@ static GnmFuncHelp const help_euroconvert[] = {
{ GNM_FUNC_HELP_ARG, F_("n:amount")},
{ GNM_FUNC_HELP_ARG, F_("source:three-letter source currency code")},
{ GNM_FUNC_HELP_ARG, F_("target:three-letter target currency code")},
- { GNM_FUNC_HELP_ARG, F_("full_precision:if true, the result is not rounded; if false the result is rounded to 0 or 2 decimals depending on the target currency; defaults to false.")},
- { GNM_FUNC_HELP_ARG, F_("triangulation_precision:number of digits (at least 3) to be rounded to after the source currency has been converted to euro; omitting this argument results in no rounding.")},
+ { GNM_FUNC_HELP_ARG, F_("full_precision:whether to provide the full precision; defaults to false")},
+ { GNM_FUNC_HELP_ARG, F_("triangulation_precision:number of digits (at least 3) to be rounded to after conversion of the source currency to euro; defaults to no rounding")},
{ GNM_FUNC_HELP_DESCRIPTION, F_("EUROCONVERT converts @{n} units of currency @{source} to currency @{target}. The rates used are the official ones used on the introduction of the Euro.") },
+ { GNM_FUNC_HELP_NOTE, F_("If @{full_precision} is true, the result is not rounded; if it false the result is rounded to 0 or 2 decimals depending on the target currency; defaults to false.")},
{ GNM_FUNC_HELP_NOTE, F_("@{source} and @{target} must be one of the currencies listed for the EURO function.") },
{ GNM_FUNC_HELP_NOTE, F_("This function is not likely to be useful anymore.") },
{ GNM_FUNC_HELP_EXAMPLES, "=EUROCONVERT(1,\"DEM\",\"ITL\")" },
diff --git a/plugins/fn-logical/ChangeLog b/plugins/fn-logical/ChangeLog
index 3839531..5cd6c18 100644
--- a/plugins/fn-logical/ChangeLog
+++ b/plugins/fn-logical/ChangeLog
@@ -1,6 +1,10 @@
+2010-06-14 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * functions.c: remove inconsistent periods, etc.
+
2010-06-10 Andreas J. Guelzow <aguelzow pyrshep ca>
- * functions.c: remove superfluous spaces, inconsitent periods, etc.
+ * functions.c: remove superfluous spaces, inconsistent periods, etc.
2010-05-30 Morten Welinder <terra gnome org>
diff --git a/plugins/fn-logical/functions.c b/plugins/fn-logical/functions.c
index c11812d..1a780a2 100644
--- a/plugins/fn-logical/functions.c
+++ b/plugins/fn-logical/functions.c
@@ -228,8 +228,8 @@ gnumeric_xor (GnmFuncEvalInfo *ei, int argc, GnmExprConstPtr const *argv)
static GnmFuncHelp const help_iferror[] = {
{ GNM_FUNC_HELP_NAME, F_("IFERROR:test for error") },
- { GNM_FUNC_HELP_ARG, F_("x:value to test for error.") },
- { GNM_FUNC_HELP_ARG, F_("y:alternate value.") },
+ { GNM_FUNC_HELP_ARG, F_("x:value to test for error") },
+ { GNM_FUNC_HELP_ARG, F_("y:alternate value") },
{ GNM_FUNC_HELP_DESCRIPTION, F_("This function returns the first value, unless that is an error, in which case it returns the second.") },
{ GNM_FUNC_HELP_EXAMPLES, "=IFERROR(1/0,14)" },
{ GNM_FUNC_HELP_SEEALSO, "IF,ISERROR" },
@@ -246,8 +246,8 @@ gnumeric_iferror (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
static GnmFuncHelp const help_ifna[] = {
{ GNM_FUNC_HELP_NAME, F_("IFNA:test for #NA! error") },
- { GNM_FUNC_HELP_ARG, F_("x:value to test for #NA! error.") },
- { GNM_FUNC_HELP_ARG, F_("y:alternate value.") },
+ { GNM_FUNC_HELP_ARG, F_("x:value to test for #NA! error") },
+ { GNM_FUNC_HELP_ARG, F_("y:alternate value") },
{ GNM_FUNC_HELP_DESCRIPTION, F_("This function returns the first value, unless that is #NA!, in which case it returns the second.") },
{ GNM_FUNC_HELP_EXAMPLES, "=IFNA(12,14)" },
{ GNM_FUNC_HELP_EXAMPLES, "=IFNA(1/0,14)" },
diff --git a/plugins/fn-stat/ChangeLog b/plugins/fn-stat/ChangeLog
index 0bfb021..ec05fb8 100644
--- a/plugins/fn-stat/ChangeLog
+++ b/plugins/fn-stat/ChangeLog
@@ -1,3 +1,7 @@
+2010-06-14 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * functions.c: remove inconsistent periods, etc.
+
2010-06-14 Morten Welinder <terra gnome org>
* functions.c (gnumeric_forecast): Handle missing data properly.
@@ -21,7 +25,7 @@
2010-06-10 Andreas J. Guelzow <aguelzow pyrshep ca>
- * functions.c: remove superfluous spaces, inconsitent periods, etc.
+ * functions.c: remove superfluous spaces, inconsistent periods, etc.
2010-05-30 Morten Welinder <terra gnome org>
diff --git a/plugins/fn-stat/functions.c b/plugins/fn-stat/functions.c
index d6b019b..fe500bc 100644
--- a/plugins/fn-stat/functions.c
+++ b/plugins/fn-stat/functions.c
@@ -164,10 +164,10 @@ static GnmFuncHelp const help_rank[] = {
{ GNM_FUNC_HELP_NAME, F_("RANK:rank of a number in a list of numbers")},
{ GNM_FUNC_HELP_ARG, F_("x:number whose rank you want to find")},
{ GNM_FUNC_HELP_ARG, F_("ref:list of numbers")},
- { GNM_FUNC_HELP_ARG, F_("order:If this is 0, numbers are ranked in descending order, otherwise numbers are ranked in ascending order. Defaults to 0.")},
+ { GNM_FUNC_HELP_ARG, F_("order:0 (descending order) or non-zero (ascending order); defaults to 0")},
{ GNM_FUNC_HELP_NOTE, F_("In case of a tie, RANK returns the largest possible rank.")},
{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.")},
- { GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 25.9.")},
+ { GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, \xe2\x80\xa6, A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 25.9.")},
{ GNM_FUNC_HELP_EXAMPLES, F_("Then RANK(17.3,A1:A5) equals 4.")},
{ GNM_FUNC_HELP_EXAMPLES, F_("Then RANK(25.9,A1:A5) equals 1.")},
{ GNM_FUNC_HELP_SEEALSO, ("PERCENTRANK,RANK.AVG")},
@@ -216,7 +216,7 @@ static GnmFuncHelp const help_rank_avg[] = {
{ GNM_FUNC_HELP_NAME, F_("RANK.AVG:rank of a number in a list of numbers")},
{ GNM_FUNC_HELP_ARG, F_("x:number whose rank you want to find")},
{ GNM_FUNC_HELP_ARG, F_("ref:list of numbers")},
- { GNM_FUNC_HELP_ARG, F_("order:If this is 0, numbers are ranked in descending order, otherwise numbers are ranked in ascending order. Defaults to 0.")},
+ { GNM_FUNC_HELP_ARG, F_("order:0 (descending order) or non-zero (ascending order); defaults to 0")},
{ GNM_FUNC_HELP_NOTE, F_("In case of a tie, RANK returns the average rank.")},
{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel 2010 compatible.")},
{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 25.9.")},
@@ -1191,7 +1191,7 @@ static GnmFuncHelp const help_tdist[] = {
{ GNM_FUNC_HELP_NAME, F_("TDIST:survival function of the Student t-distribution")},
{ GNM_FUNC_HELP_ARG, F_("x:")},
{ GNM_FUNC_HELP_ARG, F_("dof:number of degrees of freedom")},
- { GNM_FUNC_HELP_ARG, F_("tails:1 or 2.")},
+ { GNM_FUNC_HELP_ARG, F_("tails:1 or 2")},
{ GNM_FUNC_HELP_DESCRIPTION, F_("The survival function is 1 minus the cumulative distribution function.") },
{ GNM_FUNC_HELP_NOTE, F_("If @{dof} < 1 this function returns a #NUM! error.") },
{ GNM_FUNC_HELP_NOTE, F_("If @{tails} is neither 1 or 2 this function returns a #NUM! error.") },
@@ -2345,9 +2345,9 @@ gnumeric_prob (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
static GnmFuncHelp const help_steyx[] = {
{ GNM_FUNC_HELP_NAME, F_("STEYX:standard error of the predicted y-value in the regression")},
- { GNM_FUNC_HELP_ARG, F_("known_y's:known y-values")},
- { GNM_FUNC_HELP_ARG, F_("known_x's:known x-values")},
- { GNM_FUNC_HELP_NOTE, F_("If @{known_y}'s and @{known_x}'s are empty or have a different "
+ { GNM_FUNC_HELP_ARG, F_("known_ys:known y-values")},
+ { GNM_FUNC_HELP_ARG, F_("known_xs:known x-values")},
+ { GNM_FUNC_HELP_NOTE, F_("If @{known_ys} and @{known_xs} are empty or have a different "
"number of arguments then this function returns a #N/A error.")},
{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers "
@@ -2893,10 +2893,9 @@ gnumeric_percentile (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
static GnmFuncHelp const help_quartile[] = {
{ GNM_FUNC_HELP_NAME, F_("QUARTILE:the @{k}-th quartile of the data points")},
{ GNM_FUNC_HELP_ARG, F_("array:data points")},
- { GNM_FUNC_HELP_ARG, F_("quart:A number from 0 to 4, indicating which quartile to calculate. "
- "A value of 0 causes the smallest value of @{array} to be returned.")},
+ { GNM_FUNC_HELP_ARG, F_("quart:a number from 0 to 4, indicating which quartile to calculate")},
{ GNM_FUNC_HELP_NOTE, F_("If @{array} is empty, this function returns a #NUM! error.") },
- { GNM_FUNC_HELP_NOTE, F_("If @{quart} < 0 or @{quart} > 4, this function returns a #NUM! error.") },
+ { GNM_FUNC_HELP_NOTE, F_("If @{quart} < 0 or @{quart} > 4, this function returns a #NUM! error. If @{quart} = 0, the smallest value of @{array} to be returned.") },
{ GNM_FUNC_HELP_NOTE, F_("If @{quart} is not an integer, it is truncated.")},
{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1.") },
@@ -3379,13 +3378,13 @@ gnm_reg_data_collect (GnmValue const *yval, GnmValue const *xval,
static GnmFuncHelp const help_linest[] = {
{ GNM_FUNC_HELP_NAME, F_("LINEST:multiple linear regression coefficients and statistics") },
- { GNM_FUNC_HELP_ARG, F_("known_y's:vector of values of dependent variable.") },
- { GNM_FUNC_HELP_ARG, F_("known_x's:array of values of independent variables, defaults to a single vector 1,...,n.") },
- { GNM_FUNC_HELP_ARG, F_("affine:if true, the model contains a constant term, defaults to true.") },
+ { GNM_FUNC_HELP_ARG, F_("known_ys:vector of values of dependent variable") },
+ { GNM_FUNC_HELP_ARG, F_("known_xs:array of values of independent variables, defaults to a single vector {1,\xe2\x80\xa6,n}") },
+ { GNM_FUNC_HELP_ARG, F_("affine:if true, the model contains a constant term, defaults to true") },
{ GNM_FUNC_HELP_ARG, F_("stats:if true, some additional statistics are provided, defaults to false") },
{ GNM_FUNC_HELP_DESCRIPTION, F_("This function returns an array with the first row giving the regression "
"coefficients for the independent variables "
- "x_m, x_(m-1),...,x_2, x_1 followed by the y-intercept if @{affine} is true.")},
+ "x_m, x_(m-1),\xe2\x80\xa6,x_2, x_1 followed by the y-intercept if @{affine} is true.")},
{ GNM_FUNC_HELP_DESCRIPTION, F_("If @{stats} is true, the second row contains the corresponding standard "
"errors of the regression coefficients."
"In this case, the third row contains the R^2 value and the standard error "
@@ -3396,7 +3395,7 @@ static GnmFuncHelp const help_linest[] = {
{ GNM_FUNC_HELP_DESCRIPTION, F_("If @{affine} is false, R^2 is the uncentered version of the coefficient "
"of determination; "
"that is the proportion of the sum of squares explained by the model.")},
- { GNM_FUNC_HELP_NOTE, F_("If the length of @{known_y's} does not match the corresponding length of @{known_x's}, "
+ { GNM_FUNC_HELP_NOTE, F_("If the length of @{known_ys} does not match the corresponding length of @{known_xs}, "
"this function returns a #NUM! error.")},
{ GNM_FUNC_HELP_SEEALSO, "LOGEST,TREND" },
{ GNM_FUNC_HELP_END }
@@ -3476,13 +3475,13 @@ gnumeric_linest (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
static GnmFuncHelp const help_logreg[] = {
{ GNM_FUNC_HELP_NAME, F_("LOGREG:the logarithmic regression")},
- { GNM_FUNC_HELP_ARG, F_("known_y's:known y-values")},
- { GNM_FUNC_HELP_ARG, F_("known_x's:known x-values; if @{known_x}'s is omitted, an array {1, 2, 3, ...} is used.")},
- { GNM_FUNC_HELP_ARG, F_("const:If this is FALSE, the curve will be forced to go through "
- "[1; 0], i.e., b will be zero. The default is TRUE.")},
- { GNM_FUNC_HELP_ARG, F_("stat:If @{stat} is TRUE, extra statistical information will be returned; defaults to FALSE.")},
+ { GNM_FUNC_HELP_ARG, F_("known_ys:known y-values")},
+ { GNM_FUNC_HELP_ARG, F_("known_xs:known x-values; defaults to the array {1, 2, 3, \xe2\x80\xa6}")},
+ { GNM_FUNC_HELP_ARG, F_("const:if false, the curve will be forced to go through "
+ "[1; 0], i.e., b will be zero; defaults to TRUE")},
+ { GNM_FUNC_HELP_ARG, F_("stat:if true, extra statistical information will be returned; defaults to FALSE")},
{ GNM_FUNC_HELP_DESCRIPTION, F_("LOGREG function transforms your x's to z=ln(x) and "
- "applies the ``least squares'' method to fit the linear equation "
+ "applies the \xe2\x80\x9cleast squares\xe2\x80\x9d method to fit the linear equation "
"y = m * z + b "
"to your y's and z's --- equivalent to fitting the equation "
"y = m * ln(x) + b "
@@ -3498,7 +3497,7 @@ static GnmFuncHelp const help_logreg[] = {
"degrees of freedom. The last row contains the regression sum "
"of squares and the residual sum of squares."
"The default of @{stat} is FALSE.") },
- { GNM_FUNC_HELP_NOTE, F_("If @{known_y}'s and @{known_x}'s have unequal number of data points, "
+ { GNM_FUNC_HELP_NOTE, F_("If @{known_ys} and @{known_xs} have unequal number of data points, "
"this function returns a #NUM! error.") },
{ GNM_FUNC_HELP_SEEALSO, "LOGFIT,LINEST,LOGEST"},
{ GNM_FUNC_HELP_END }
@@ -3593,10 +3592,10 @@ gnumeric_logreg (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
static GnmFuncHelp const help_logfit[] = {
{ GNM_FUNC_HELP_NAME, F_("LOGFIT:logarithmic least square fit (using a trial and error method)")},
- { GNM_FUNC_HELP_ARG, F_("known_y's:known y-values")},
- { GNM_FUNC_HELP_ARG, F_("known_x's:known x-values")},
+ { GNM_FUNC_HELP_ARG, F_("known_ys:known y-values")},
+ { GNM_FUNC_HELP_ARG, F_("known_xs:known x-values")},
{ GNM_FUNC_HELP_DESCRIPTION, F_(
- "LOGFIT function applies the ``least squares'' method to fit "
+ "LOGFIT function applies the \xe2\x80\x9cleast squares\xe2\x80\x9d method to fit "
"the logarithmic equation "
"y = a + b * ln(sign * (x - c)) , sign = +1 or -1 "
"to your data. The graph of the equation is a logarithmic curve "
@@ -3688,13 +3687,13 @@ numbers */
static GnmFuncHelp const help_trend[] = {
{ GNM_FUNC_HELP_NAME, F_("TREND:estimates future values of a given data set using a least squares approximation")},
- { GNM_FUNC_HELP_ARG, F_("known_y's:known y-values")},
- { GNM_FUNC_HELP_ARG, F_("known_x's:known x-values; if @{known_x}'s is omitted, an array {1, 2, 3, ...} is used.")},
- { GNM_FUNC_HELP_ARG, F_("new_x's:x-values for which you want to estimate the y-values; defaults to @{known_x}'s")},
+ { GNM_FUNC_HELP_ARG, F_("known_ys:known y-values")},
+ { GNM_FUNC_HELP_ARG, F_("known_xs:known x-values; defaults to the array {1, 2, 3, \xe2\x80\xa6}")},
+ { GNM_FUNC_HELP_ARG, F_("new_xs:x-values for which to estimate the y-values; defaults to @{known_xs}")},
{ GNM_FUNC_HELP_ARG, F_("const:if this is false the line will be forced to go through the origin; defaults to TRUE")},
- { GNM_FUNC_HELP_NOTE, F_("If @{known_y's} and @{known_x's} have unequal number of data points, "
+ { GNM_FUNC_HELP_NOTE, F_("If @{known_ys} and @{known_xs} have unequal number of data points, "
"this function returns a #NUM! error.") },
- { GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers "
+ { GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, \xe2\x80\xa6, A5 contain numbers "
"11.4, 17.3, 21.3, 25.9, and 40.1, and the cells B1, B2, ... "
"B5 23.2, 25.8, 29.9, 33.5, and 42.7.") },
{ GNM_FUNC_HELP_EXAMPLES, F_("Then TREND(A1:A5,B1:B5) equals {12.1, 15.7, 21.6, 26.7, 39.7}.") },
@@ -3800,11 +3799,12 @@ gnumeric_trend (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
static GnmFuncHelp const help_logest[] = {
{ GNM_FUNC_HELP_NAME, F_("LOGEST:exponential least square fit")},
- { GNM_FUNC_HELP_ARG, F_("known_y's:known y-values")},
- { GNM_FUNC_HELP_ARG, F_("known_x's:known x-values; if @{known_x}'s is omitted, an array {1, 2, 3, ...} is used.")},
- { GNM_FUNC_HELP_ARG, F_("const:if this is false the line will be forced to go through (0,1); defaults to TRUE")},
- { GNM_FUNC_HELP_ARG, F_("stat:If @{stat} is TRUE, extra statistical information will be returned; defaults to FALSE.")},
- { GNM_FUNC_HELP_DESCRIPTION, F_("LOGEST function applies the ``least squares'' method to fit "
+ { GNM_FUNC_HELP_ARG, F_("known_ys:known y-values")},
+ { GNM_FUNC_HELP_ARG, F_("known_xs:known x-values; default to an array {1, 2, 3, \xe2\x80\xa6}")},
+ { GNM_FUNC_HELP_ARG, F_("const:if false the line will be forced to go through (0,1); defaults to TRUE")},
+ { GNM_FUNC_HELP_ARG, F_("stat:if true, extra statistical information will be returned; defaults to FALSE")},
+ { GNM_FUNC_HELP_DESCRIPTION, F_("LOGEST function applies the "
+ "\xe2\x80\x9cleast squares\xe2\x80\x9d method to fit "
"an exponential curve of the form\t"
"y = b * m{1}^x{1} * m{2}^x{2}... to your data.") },
{ GNM_FUNC_HELP_DESCRIPTION, F_("LOGEST returns an array { m{n},m{n-1}, ...,m{1},b }.") },
@@ -3817,7 +3817,7 @@ static GnmFuncHelp const help_logest[] = {
"the F-observed value and the degrees of freedom. The last row "
"contains the regression sum of squares and the residual sum "
"of squares.") },
- { GNM_FUNC_HELP_NOTE, F_("If @{known_y}'s and @{known_x}'s have unequal number of data points, "
+ { GNM_FUNC_HELP_NOTE, F_("If @{known_ys} and @{known_xs} have unequal number of data points, "
"this function returns a #NUM! error.") },
{ GNM_FUNC_HELP_SEEALSO, "GROWTH,TREND"},
{ GNM_FUNC_HELP_END }
@@ -3897,9 +3897,9 @@ gnumeric_logest (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
static GnmFuncHelp const help_growth[] = {
{ GNM_FUNC_HELP_NAME, F_("GROWTH:exponential growth prediction")},
- { GNM_FUNC_HELP_ARG, F_("known_y's:known y-values")},
- { GNM_FUNC_HELP_ARG, F_("known_x's:known x-values; if @{known_x}'s is omitted, an array {1, 2, 3, ...} is used.")},
- { GNM_FUNC_HELP_ARG, F_("new_x's:x-values for which you want to estimate the y-values; defaults to @{known_x}'s")},
+ { GNM_FUNC_HELP_ARG, F_("known_ys:known y-values")},
+ { GNM_FUNC_HELP_ARG, F_("known_xs:known x-values; defaults to the array {1, 2, 3, \xe2\x80\xa6}")},
+ { GNM_FUNC_HELP_ARG, F_("new_xs:x-values for which to estimate the y-values; defaults to @{known_xs}")},
{ GNM_FUNC_HELP_ARG, F_("const:if this is false the line will be forced to go through the origin; defaults to TRUE")},
{ GNM_FUNC_HELP_DESCRIPTION, F_("GROWTH function applies the \xe2\x80\x9cleast "
"squares\xe2\x80\x9d method to fit an "
@@ -3907,8 +3907,8 @@ static GnmFuncHelp const help_growth[] = {
"the exponential "
"growth by using this curve.")},
{ GNM_FUNC_HELP_DESCRIPTION, F_("GROWTH returns an array having one column and a row for each "
- "data point in @{new_x}.") },
- { GNM_FUNC_HELP_NOTE, F_("If @{known_y}'s and @{known_x}'s have unequal number of data points, "
+ "data point in @{new_xs}.") },
+ { GNM_FUNC_HELP_NOTE, F_("If @{known_ys} and @{known_xs} have unequal number of data points, "
"this function returns a #NUM! error.") },
{ GNM_FUNC_HELP_SEEALSO, "LOGEST,GROWTH,TREND"},
{ GNM_FUNC_HELP_END }
@@ -3996,13 +3996,13 @@ static GnmFuncHelp const help_forecast[] = {
{ GNM_FUNC_HELP_NAME, F_("FORECAST:estimates a future value according to existing values "
"using simple linear regression")},
{ GNM_FUNC_HELP_ARG, F_("x:x-value whose matching y-value should be forecast")},
- { GNM_FUNC_HELP_ARG, F_("known_y's:known y-values")},
- { GNM_FUNC_HELP_ARG, F_("known_x's:known x-values")},
+ { GNM_FUNC_HELP_ARG, F_("known_ys:known y-values")},
+ { GNM_FUNC_HELP_ARG, F_("known_xs:known x-values")},
{ GNM_FUNC_HELP_DESCRIPTION, F_("This function estimates a future value according to "
"existing values using simple linear regression.") },
- { GNM_FUNC_HELP_NOTE, F_("If @{known_x} or @{known_y} contains no data entries or different "
+ { GNM_FUNC_HELP_NOTE, F_("If @{known_xs} or @{known_ys} contains no data entries or different "
"number of data entries, this function returns a #N/A error.") },
- { GNM_FUNC_HELP_NOTE, F_("If the variance of the @{known_x} is zero, this function returns a #DIV/0 "
+ { GNM_FUNC_HELP_NOTE, F_("If the variance of the @{known_xs} is zero, this function returns a #DIV/0 "
"error.")},
{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers "
@@ -4058,11 +4058,11 @@ gnumeric_forecast (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
static GnmFuncHelp const help_intercept[] = {
{ GNM_FUNC_HELP_NAME, F_("INTERCEPT:the intercept of a linear regression line")},
- { GNM_FUNC_HELP_ARG, F_("known_y's:known y-values")},
- { GNM_FUNC_HELP_ARG, F_("known_x's:known x-values")},
- { GNM_FUNC_HELP_NOTE, F_("If @{known_x} or @{known_y} contains no data entries or different "
+ { GNM_FUNC_HELP_ARG, F_("known_ys:known y-values")},
+ { GNM_FUNC_HELP_ARG, F_("known_xs:known x-values")},
+ { GNM_FUNC_HELP_NOTE, F_("If @{known_xs} or @{known_ys} contains no data entries or different "
"number of data entries, this function returns a #N/A error.") },
- { GNM_FUNC_HELP_NOTE, F_("If the variance of the @{known_x} is zero, this function returns "
+ { GNM_FUNC_HELP_NOTE, F_("If the variance of the @{known_xs} is zero, this function returns "
"#DIV/0 error.")},
{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers "
@@ -4113,12 +4113,12 @@ gnumeric_intercept (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
static GnmFuncHelp const help_slope[] = {
{ GNM_FUNC_HELP_NAME, F_("SLOPE:the slope of a linear regression line")},
- { GNM_FUNC_HELP_ARG, F_("known_y's:known y-values")},
- { GNM_FUNC_HELP_ARG, F_("known_x's:known x-values")},
+ { GNM_FUNC_HELP_ARG, F_("known_ys:known y-values")},
+ { GNM_FUNC_HELP_ARG, F_("known_xs:known x-values")},
{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
- { GNM_FUNC_HELP_NOTE, F_("If @{known_x} or @{known_y} contains no data entries or different "
+ { GNM_FUNC_HELP_NOTE, F_("If @{known_xs} or @{known_ys} contains no data entries or different "
"number of data entries, this function returns a #N/A error.") },
- { GNM_FUNC_HELP_NOTE, F_("If the variance of the @{known_x} is zero, this function returns "
+ { GNM_FUNC_HELP_NOTE, F_("If the variance of the @{known_xs} is zero, this function returns "
"#DIV/0 error.")},
{ GNM_FUNC_HELP_EXAMPLES, F_("Let us assume that the cells A1, A2, ..., A5 contain numbers "
"11.4, 17.3, 21.3, 25.9, and 40.1, and the cells B1, B2, ... "
diff --git a/plugins/fn-tsa/ChangeLog b/plugins/fn-tsa/ChangeLog
index 9b465f1..2e089c5 100644
--- a/plugins/fn-tsa/ChangeLog
+++ b/plugins/fn-tsa/ChangeLog
@@ -1,6 +1,10 @@
+2010-06-14 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * functions.c: remove inconsistent periods, etc.
+
2010-06-10 Andreas J. Guelzow <aguelzow pyrshep ca>
- * functions.c: remove superfluous spaces, inconsitent periods, etc.
+ * functions.c: remove superfluous spaces, inconsistent periods, etc.
2010-05-30 Morten Welinder <terra gnome org>
diff --git a/plugins/fn-tsa/functions.c b/plugins/fn-tsa/functions.c
index 403b65e..e5bd1d5 100644
--- a/plugins/fn-tsa/functions.c
+++ b/plugins/fn-tsa/functions.c
@@ -369,14 +369,14 @@ spline_averaging (const gnm_float *absc, const gnm_float *ord, int nb_knots,
static GnmFuncHelp const help_interpolation[] = {
{ GNM_FUNC_HELP_NAME, F_("INTERPOLATION:interpolated values corresponding to the given abscissa targets") },
- { GNM_FUNC_HELP_ARG, F_("abscissas:The abscissas of the data to interpolate.") },
- { GNM_FUNC_HELP_ARG, F_("ordinates:The ordinates of the data to interpolate.") },
- { GNM_FUNC_HELP_ARG, F_("targets:The abscissas of the interpolated data.") },
- { GNM_FUNC_HELP_ARG, F_("interpolation:The method of interpolation to be used, defaults to no interpolation") },
+ { GNM_FUNC_HELP_ARG, F_("abscissae:abscissae of the given data points") },
+ { GNM_FUNC_HELP_ARG, F_("ordinates:ordinates of the given data points") },
+ { GNM_FUNC_HELP_ARG, F_("targets:abscissae of the interpolated data") },
+ { GNM_FUNC_HELP_ARG, F_("interpolation:method of interpolation, defaults to none") },
{ GNM_FUNC_HELP_DESCRIPTION, F_("If an interpolation method is used, the number of returned values is one less than the number of targets and the targets values must be given in increasing order.") },
{ GNM_FUNC_HELP_DESCRIPTION, F_("The output consists always of one column of numbers.") },
INTERPOLATIONMETHODS,
- { GNM_FUNC_HELP_NOTE, F_("Strings and empty cells in @{abscissas} and @{ordinates} are ignored.") },
+ { GNM_FUNC_HELP_NOTE, F_("Strings and empty cells in @{abscissae} and @{ordinates} are ignored.") },
{ GNM_FUNC_HELP_NOTE, F_("If several target data are provided they must be in the same column in consecutive cells.") },
{ GNM_FUNC_HELP_SEEALSO, "PERIODOGRAM" },
{ GNM_FUNC_HELP_END }
@@ -621,11 +621,11 @@ gnumeric_interpolation (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
static GnmFuncHelp const help_periodogram[] = {
{ GNM_FUNC_HELP_NAME, F_("PERIODOGRAM:periodogram of the given data") },
- { GNM_FUNC_HELP_ARG, F_("ordinates:The ordinates of the data to interpolate.") },
- { GNM_FUNC_HELP_ARG, F_("filter:Window function to be used, defaults to no window function.") },
- { GNM_FUNC_HELP_ARG, F_("abscissas:The abscissas of the data to interpolate, defaults to regularly spaced abscissa.") },
- { GNM_FUNC_HELP_ARG, F_("interpolation:The method of interpolation to be used, defaults to no interpolation") },
- { GNM_FUNC_HELP_ARG, F_("number:Number of interpolated data points to be used.") },
+ { GNM_FUNC_HELP_ARG, F_("ordinates:ordinates of the given data") },
+ { GNM_FUNC_HELP_ARG, F_("filter:windowing function to be used, defaults to no filter") },
+ { GNM_FUNC_HELP_ARG, F_("abscissae:abscissae of the given data, defaults to regularly spaced abscissae") },
+ { GNM_FUNC_HELP_ARG, F_("interpolation:method of interpolation, defaults to none") },
+ { GNM_FUNC_HELP_ARG, F_("number:number of interpolated data points") },
{ GNM_FUNC_HELP_DESCRIPTION, F_("If an interpolation method is used, the number of returned values is one less than the number of targets and the targets values must be given in increasing order.") },
{ GNM_FUNC_HELP_DESCRIPTION, F_("The output consists always of one column of numbers.") },
INTERPOLATIONMETHODS,
@@ -634,7 +634,7 @@ static GnmFuncHelp const help_periodogram[] = {
"1: Bartlett (triangular window)\n"
"2: Hahn (cosine window)\n"
"3: Welch (parabolic window)") },
- { GNM_FUNC_HELP_NOTE, F_("Strings and empty cells in @{abscissas} and @{ordinates} are ignored.") },
+ { GNM_FUNC_HELP_NOTE, F_("Strings and empty cells in @{abscissae} and @{ordinates} are ignored.") },
{ GNM_FUNC_HELP_NOTE, F_("If several target data are provided they must be in the same column in consecutive cells.") },
{ GNM_FUNC_HELP_SEEALSO, "INTERPOLATION" },
{ GNM_FUNC_HELP_END }
diff --git a/src/func-builtin.c b/src/func-builtin.c
index aa63966..6137f33 100644
--- a/src/func-builtin.c
+++ b/src/func-builtin.c
@@ -267,11 +267,11 @@ static GnmFuncHelp const help_if[] = {
/* xgettext : see po-functions/README.translators */
{ GNM_FUNC_HELP_NAME, N_("IF:conditional expression") },
/* xgettext : see po-functions/README.translators */
- { GNM_FUNC_HELP_ARG, N_("cond:condition.") },
+ { GNM_FUNC_HELP_ARG, N_("cond:condition") },
/* xgettext : see po-functions/README.translators */
- { GNM_FUNC_HELP_ARG, N_("trueval:value to use if condition is true.") },
+ { GNM_FUNC_HELP_ARG, N_("trueval:value to use if condition is true") },
/* xgettext : see po-functions/README.translators */
- { GNM_FUNC_HELP_ARG, N_("falseval:value to use if condition is false.") },
+ { GNM_FUNC_HELP_ARG, N_("falseval:value to use if condition is false") },
{ GNM_FUNC_HELP_DESCRIPTION, N_("This function first evaluates the condition. If the result is true, it will then evaluate and return the second argument. Otherwise, it will evaluate and return the last argument.") },
{ GNM_FUNC_HELP_EXAMPLES, "=IF(1+2=3,\"x\",\"y\")" },
{ GNM_FUNC_HELP_SEEALSO, "AND,OR,XOR,NOT,IFERROR" },
diff --git a/src/func.c b/src/func.c
index 7f9b453..f149451 100644
--- a/src/func.c
+++ b/src/func.c
@@ -540,6 +540,13 @@ gnm_func_sanity_check1 (GnmFunc const *fd)
g_assert (h->type <= GNM_FUNC_HELP_ODF);
counts[h->type]++;
+ if (!g_utf8_validate (h->text, -1, NULL)) {
+ g_printerr ("%s: Invalid UTF-8 in type %i\n",
+ fd->name, h->type);
+ res = 1;
+ continue;
+ }
+
switch (h->type) {
case GNM_FUNC_HELP_NAME:
if (g_ascii_strncasecmp (fd->name, h->text, nlen) ||
@@ -567,6 +574,10 @@ gnm_func_sanity_check1 (GnmFunc const *fd)
g_printerr ("%s: Unwanted space in ARG record\n",
fd->name);
res = 1;
+ } else if (h->text[strlen (h->text) - 1] == '.') {
+ g_printerr ("%s: Unwanted period in ARG record\n",
+ fd->name);
+ res = 1;
}
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]