[gnumeric] fix function docs
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] fix function docs
- Date: Sat, 12 Feb 2011 17:45:15 +0000 (UTC)
commit c96b0019124c874bdc48722b5e45b8e9d182de12
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date: Sat Feb 12 10:48:02 2011 -0700
fix function docs
2011-02-12 Andreas J. Guelzow <aguelzow pyrshep ca>
* func.defs: update
* functions.xml: update
2011-02-12 Andreas J. Guelzow <aguelzow pyrshep ca>
* functions.c (help_atan2): Correct result range.
(help_atan): add result range note
doc/C/ChangeLog | 5 +++++
doc/C/func.defs | 5 +++--
doc/C/functions.xml | 8 ++++++--
plugins/fn-math/ChangeLog | 5 +++++
plugins/fn-math/functions.c | 28 ++++++++++++++++++++--------
5 files changed, 39 insertions(+), 12 deletions(-)
---
diff --git a/doc/C/ChangeLog b/doc/C/ChangeLog
index 8daa8b9..16dbcbc 100644
--- a/doc/C/ChangeLog
+++ b/doc/C/ChangeLog
@@ -1,3 +1,8 @@
+2011-02-12 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * func.defs: update
+ * functions.xml: update
+
2011-02-02 Morten Welinder <terra gnome org>
* Release 1.10.13
diff --git a/doc/C/func.defs b/doc/C/func.defs
index f664e65..aaaf87a 100644
--- a/doc/C/func.defs
+++ b/doc/C/func.defs
@@ -3086,17 +3086,18 @@ The depreciation coefficient used is:
@SYNTAX=ATAN(x)
@ARGUMENTDESCRIPTION= {x}: number
@DESCRIPTION=ATAN calculates the arc tangent of @{x}; that is the value whose tangent is @{x}.
+ NOTE=The result will be between â??Ï?/2 and +Ï?/2.
@EXCEL=This function is Excel compatible.
@SEEALSO=TAN,COS,SIN,DEGREES,RADIANS
@CATEGORY=Mathematics
@FUNCTION=ATAN2
- SHORTDESC=the arc tangent of the ratio of @{y}/@{x}
+ SHORTDESC=the arc tangent of the ratio @{y}/@{x}
@SYNTAX=ATAN2(x,y)
@ARGUMENTDESCRIPTION= {x}: x-coordinate
@{y}: y-coordinate
@DESCRIPTION=ATAN2 calculates the direction from the origin to the point (@{x},@{y}) as an angle from the x-axis in radians.
- NOTE=The result will be between Ï? and +Ï?. The order of the arguments may be unexpected.
+ NOTE=The result will be between â??Ï? and +Ï?. The order of the arguments may be unexpected.
@EXCEL=This function is Excel compatible.
@ODF=This function is OpenFormula compatible.
@SEEALSO=ATAN,ATANH,COS,SIN
diff --git a/doc/C/functions.xml b/doc/C/functions.xml
index dbc6f7a..5755b03 100644
--- a/doc/C/functions.xml
+++ b/doc/C/functions.xml
@@ -10218,6 +10218,10 @@
<para><function>ATAN</function> calculates the arc tangent of <parameter>x</parameter>; that is the value whose tangent is <parameter>x</parameter>.</para>
</refsect1>
<refsect1>
+ <title>Note</title>
+ <para>The result will be between â??Ï?/2 and +Ï?/2.</para>
+ </refsect1>
+ <refsect1>
<title>Microsoft Excel Compatibility</title>
<para>This function is Excel compatible.</para>
</refsect1>
@@ -10242,7 +10246,7 @@
<function>ATAN2</function>
</refname>
<refpurpose>
- the arc tangent of the ratio of <parameter>y</parameter>/<parameter>x</parameter>
+ the arc tangent of the ratio <parameter>y</parameter>/<parameter>x</parameter>
</refpurpose>
</refnamediv>
<refsynopsisdiv>
@@ -10259,7 +10263,7 @@
</refsect1>
<refsect1>
<title>Note</title>
- <para>The result will be between Ï? and +Ï?. The order of the arguments may be unexpected.</para>
+ <para>The result will be between â??Ï? and +Ï?. The order of the arguments may be unexpected.</para>
</refsect1>
<refsect1>
<title>Microsoft Excel Compatibility</title>
diff --git a/plugins/fn-math/ChangeLog b/plugins/fn-math/ChangeLog
index 440e65a..0131476 100644
--- a/plugins/fn-math/ChangeLog
+++ b/plugins/fn-math/ChangeLog
@@ -1,3 +1,8 @@
+2011-02-12 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * functions.c (help_atan2): Correct result range.
+ (help_atan): add result range note
+
2011-02-02 Morten Welinder <terra gnome org>
* Release 1.10.13
diff --git a/plugins/fn-math/functions.c b/plugins/fn-math/functions.c
index deb4e1e..428868c 100644
--- a/plugins/fn-math/functions.c
+++ b/plugins/fn-math/functions.c
@@ -42,6 +42,9 @@
#include <math.h>
#include <string.h>
+#define UNICODE_PI "\xcf\x80"
+#define UNICODE_MINUS "\xe2\x88\x92"
+
GNM_PLUGIN_MODULE_HEADER;
@@ -254,7 +257,6 @@ gnumeric_acos (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
if (t < -1.0 || t > 1.0)
return value_new_error_NUM (ei->pos);
-
return value_new_float (gnm_acos (t));
}
@@ -324,7 +326,8 @@ static GnmFuncHelp const help_asin[] = {
{ GNM_FUNC_HELP_ARG, F_("x:number")},
{ GNM_FUNC_HELP_DESCRIPTION, F_("ASIN calculates the arc sine of @{x}; that is the value whose sine is @{x}.")},
{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
- { GNM_FUNC_HELP_NOTE, F_("If @{x} falls outside the range -1 to 1, ASIN returns #NUM!") },
+ { GNM_FUNC_HELP_NOTE, F_("If @{x} falls outside the range -1 to 1, "
+ "ASIN returns #NUM!") },
{ GNM_FUNC_HELP_EXAMPLES, "=ASIN(0.5)" },
{ GNM_FUNC_HELP_EXAMPLES, "=ASIN(1)" },
{ GNM_FUNC_HELP_SEEALSO, "SIN,COS,ASINH,DEGREES,RADIANS"},
@@ -366,7 +369,12 @@ gnumeric_asinh (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
static GnmFuncHelp const help_atan[] = {
{ GNM_FUNC_HELP_NAME, F_("ATAN:the arc tangent of @{x}")},
{ GNM_FUNC_HELP_ARG, F_("x:number")},
- { GNM_FUNC_HELP_DESCRIPTION, F_("ATAN calculates the arc tangent of @{x}; that is the value whose tangent is @{x}.")},
+ { GNM_FUNC_HELP_DESCRIPTION, F_("ATAN calculates the arc tangent "
+ "of @{x}; that is the value whose "
+ "tangent is @{x}.")},
+ { GNM_FUNC_HELP_NOTE, F_("The result will be between "
+ UNICODE_MINUS UNICODE_PI "/2 and "
+ "+" UNICODE_PI "/2.")},
{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
{ GNM_FUNC_HELP_EXAMPLES, "=ATAN(0.5)" },
{ GNM_FUNC_HELP_EXAMPLES, "=ATAN(1)" },
@@ -416,8 +424,9 @@ static GnmFuncHelp const help_atan2[] = {
"the origin to the point (@{x},@{y}) "
"as an angle from the x-axis in "
"radians.")},
- { GNM_FUNC_HELP_NOTE, F_("The result will be between \xcf\x80 and "
- "+\xcf\x80.")},
+ { GNM_FUNC_HELP_NOTE, F_("The result will be between "
+ UNICODE_MINUS UNICODE_PI " and "
+ "+" UNICODE_PI ".")},
{ GNM_FUNC_HELP_NOTE, F_("The order of the arguments may be "
"unexpected.")},
{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
@@ -1604,8 +1613,10 @@ gnumeric_tanh (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
/***************************************************************************/
static GnmFuncHelp const help_pi[] = {
- { GNM_FUNC_HELP_NAME, F_("PI:the constant \xcf\x80")},
- { GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible, but it returns \xcf\x80 with a better precision.") },
+ { GNM_FUNC_HELP_NAME, F_("PI:the constant " UNICODE_PI)},
+ { GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible, but it "
+ "returns " UNICODE_PI " with a better "
+ "precision.") },
{ GNM_FUNC_HELP_EXAMPLES, "=PI()" },
{ GNM_FUNC_HELP_SEEALSO, "SQRTPI"},
{ GNM_FUNC_HELP_END}
@@ -1859,7 +1870,8 @@ gnumeric_sign (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
/***************************************************************************/
static GnmFuncHelp const help_sqrtpi[] = {
- { GNM_FUNC_HELP_NAME, F_("SQRTPI:the square root of @{x} times \xcf\x80")},
+ { GNM_FUNC_HELP_NAME, F_("SQRTPI:the square root of @{x} times "
+ UNICODE_PI)},
{ GNM_FUNC_HELP_ARG, F_("x:non-negative number")},
{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
{ GNM_FUNC_HELP_EXAMPLES, "=SQRTPI(2)"},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]