Commit fea6e072 authored by Adrian Likins's avatar Adrian Likins Committed by Adrian Likins
Browse files

*src/fn-math.c: first stab at fleshing out the help blurbs here. -adrian

1998-09-21  Adrian Likins <adrian@gimp.org>

        *src/fn-math.c: first stab at fleshing out the help
	        blurbs here.
-adrian
parent 70717960
1998-09-21 Adrian Likins <adrian@gimp.org>
*src/fn-math.c: firat stab at fleshing out the help
blurbs here.
1998-09-21 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/expr.c (do_expr_decode_tree): When decoding a tree, include
......
1998-09-21 Adrian Likins <adrian@gimp.org>
*src/fn-math.c: firat stab at fleshing out the help
blurbs here.
1998-09-21 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/expr.c (do_expr_decode_tree): When decoding a tree, include
......
1998-09-21 Adrian Likins <adrian@gimp.org>
*src/fn-math.c: firat stab at fleshing out the help
blurbs here.
1998-09-21 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/expr.c (do_expr_decode_tree): When decoding a tree, include
......
1998-09-21 Adrian Likins <adrian@gimp.org>
*src/fn-math.c: firat stab at fleshing out the help
blurbs here.
1998-09-21 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/expr.c (do_expr_decode_tree): When decoding a tree, include
......
......@@ -119,6 +119,566 @@ static char *help_ = {
#endif
static char *help_atan2 = {
N_("<function>ATAN2</function>"
"<syntax>ATAN2(b1,b2)</syntax>n"
"<description>"
"The ATAN2 function calculates the arc tangent of the two "
"variables b1 and b2. It is similar to calculating the arc "
"tangent of b2 / b1, except that the signs of both arguments "
"are used to determine the quadrant of the result. "
"The result is in Radians."
"<p>"
"Performing this function on a string or empty cell simply does nothing. "
"This function only takes one argument."
"<p>"
""
""
""
"</description>"
"<seealso>ATAN, ATANH, COS, SIN, DEGREES, RADIANS</seealso>")
};
static char *help_atanh = {
N_("<function>ATANH</function>"
"<syntax>ATANH(b1)</syntax>n"
"<description>"
"The ATANH function calculates the inverse hyperbolic "
"tangent of b1; that is the value whose hyperbolic tangent "
"is b1. If the absolute value of b1 is greater than 1.0, "
" ATANH returns an error of 'atanh: domain error' "
"<p>"
"Performing this function on a string or empty cell simply does nothing. "
"This function only takes one argument."
"<p>"
""
""
""
"</description>"
"<seealso>ATAN, TAN, SIN, COS, DEGREES, RADIANS</seealso>")
};
static char *help_atan = {
N_("<function>ATAN</function>"
"<syntax>ATAN(b1)</syntax>n"
"<description>"
"The ATAN function calculates the arc tangent of b1; that "
" is the value whose tangent is b1."
"Return value is in radians."
"<p>"
"Performing this function on a string or empty cell simply does nothing. "
"This function only takes one argument."
"<p>"
""
""
""
"</description>"
"<seealso>TAN, COS, SIN, DEGREES, RADIANS</seealso>")
};
static char *help_asinh = {
N_("<function>ASINH</function>"
"<syntax>ASINH(b1)</syntax>n"
"<description>"
"The ASIN function calculates the inverse hyperbolic "
" sine of b1; that is the value whose hyperbolic sine is b1. "
"<p>"
"Performing this function on a string or empty cell simply does nothing. "
"This function only takes one argument."
"<p>"
""
""
""
"</description>"
"<seealso>ASIN, SIN, COS, DEGREES, RADIANS</seealso>")
};
static char *help_asin = {
N_("<function>ASIN</function>"
"<syntax>ASIN(b1)</syntax>n"
"<description>"
"The ASIN function calculates the arc sine of b1; that is "
"the value whose sine is b1. If b1 falls outside the range "
"-1 to 1, ASIN fails and returns the error 'asin - domain error' "
"<p>"
"Performing this function on a string or empty cell simply does nothing. "
"This function only takes one argument."
"<p>"
""
""
""
"</description>"
"<seealso>SIN, COS, ASINH, DEGREES, RADIANS</seealso>")
};
static char *help_acosh = {
N_("<function>ACOSH</function>"
"<syntax>ACOSH(b1)</syntax>n"
"<description>"
"The ACOSH function calculates the inverse hyperbolic "
"cosine of b1; that is the value whose hyperbolic cosine is "
"b1. If b1 is less than 1.0, acosh() returns the error "
" 'acosh - domain error'"
"<p>"
"Performing this function on a string or empty cell simply does nothing. "
"This function only takes one argument."
"<p>"
""
""
""
"</description>"
"<seealso>ACOS, DEGREES, RADIANS </seealso>")
};
static char *help_acos = {
N_("<function>ACOS</function>"
"<syntax>ACOS(b1)</syntax>n"
"<description>"
"The ACOS function calculates the arc cosine of b1; that "
" is the value whose cosine is b1. If b1 falls outside the "
" range -1 to 1, ACOS fails and returns the error 'acos - domain error'. "
" The value it returns is in radians. "
"<p>"
"Performing this function on a string or empty cell simply does nothing. "
"This function only takes one argument."
"<p>"
""
""
""
"</description>"
"<seealso>COS, SIN, DEGREES, RADIANS</seealso>")
};
static char *help_tanh = {
N_("<function>TANH</function>"
"<syntax>TANH(b1)</syntax>n"
"<description>"
" The TANH function returns the hyperbolic tangent of b1, "
" which is defined mathematically as sinh(b1) / cosh(b1). "
"<p>"
"Performing this function on a string or empty cell simply does nothing. "
"This function only takes one argument."
"<p>"
""
""
""
"</description>"
"<seealso>TAN, SIN, SINH, COS, COSH, DEGREES, RADIANS</seealso>")
};
static char *help_tan = {
N_("<function>TAN</function>"
"<syntax>TAN(b1)</syntax>n"
"<description>"
"The TAN function returns the tangent of b1, where b1 is "
"given in radians. "
"<p>"
"Performing this function on a string or empty cell simply does nothing. "
"This function only takes one argument."
"<p>"
""
""
""
"</description>"
"<seealso>TANH, COS, COSH, SIN, SINH, DEGREES, RADIANS</seealso>")
};
static char *help_sinh = {
N_("<function>SINH</function>"
"<syntax>SINH(b1)</syntax>n"
"<description>"
"The SINH function returns the hyperbolic sine of b1, "
"which is defined mathematically as (exp(b1) - exp(-b1)) / 2. "
" b1 is in radians. "
"<p>"
"Performing this function on a string or empty cell simply does nothing. "
"This function only takes one argument."
"<p>"
""
""
""
"</description>"
"<seealso>SIN, COS, COSH, TAN, TANH, DEGREES, RADIANS, EXP</seealso>")
};
static char *help_cosh = {
N_("<function>COSH</function>"
"<syntax>COSH(b1)</syntax>n"
"<description>"
"The COSH function returns the hyperbolic cosine of b1, "
" which is defined mathematically as (exp(b1) + exp(-b1)) / 2. "
" b1 is in radians. "
"<p>"
"Performing this function on a string or empty cell simply does nothing. "
"This function only takes one argument."
"<p>"
""
""
""
"</description>"
"<seealso>COS, SIN, SINH, TAN, TANH, RADIANS, DEGREES, EXP</seealso>")
};
static char *help_sin = {
N_("<function>SIN</function>"
"<syntax>SIN(b1)</syntax>n"
"<description>"
"The SIN function returns the sine of b1, where b1 is given "
" in radians. "
"<p>"
"Performing this function on a string or empty cell simply does nothing. "
"This function only takes one argument."
"<p>"
""
""
""
"</description>"
"<seealso>COS, COSH, SINH, TAN, TANH, RADIANS, DEGREES</seealso>")
};
static char *help_cos = {
N_("<function>COS</function>"
"<syntax>COS(b1)</syntax>n"
"<description>"
"The COS function returns the cosine of b1, where b1 is "
"given in radians. "
"<p>"
"Performing this function on a string or empty cell simply does nothing. "
"This function only takes one argument."
"<p>"
""
""
""
"</description>"
"<seealso>COSH, SIN, SINH, TAN, TANH, RADIANS, DEGREES</seealso>")
};
static char *help_int = {
N_("<function>INT</function>"
"<syntax>INT(b1, b2, ...)</syntax>n"
"<description>"
"The INT function round b1 now to the nearest int. "
"Where 'nearest' implies being closer to zero. "
"Eqilivent to FLOOR(b1) for b1 >0, amd CEIL(b1) "
"for b1 < 0. "
"<p>"
"Performing this function on a string or empty cell simply does nothing."
""
"<p>"
""
""
""
"</description>"
"<seealso>FLOOR, CEIL, ABS</seealso>")
};
static char *help_count = {
N_("<function>COUNT</function>"
"<syntax>COUNT(b1, b2, ...)</syntax>n"
"<description>"
"Returns the total number of arguments passed."
"<p>"
"Performing this function on a string or empty cell simply does nothing."
""
"<p>"
""
""
""
"</description>"
"<seealso>AVERAGE</seealso>")
};
static char *help_fact = {
N_("<function>FACT</function>"
"<syntax>FACT(b1)</syntax>n"
"<description>"
"Computes the factorial of b1. ie, b1!"
"<p>"
"Performing this function on a string or empty cell returns an error"
""
"<p>"
"`Factorials were someone's attempt to make math *look* exciting. ` --Steven Wright "
""
""
"</description>"
"<seealso></seealso>")
};
static char *help_exp = {
N_("<function>EXP</function>"
"<syntax>EXP(b1)</syntax>n"
"<description>"
"Computes the value of e(the base of natural logarithmns) raised "
"to the power of b1. "
"<p>"
"Performing this function on a string or empty cell returns an error."
""
"<p>"
""
""
""
"</description>"
"<seealso>LOG, LOG2, LOG10</seealso>")
};
static char *help_log = {
N_("<function>LOG</function>"
"<syntax>LOG(b1)</syntax>n"
"<description>"
"Computes the natural logarithm of b1. "
"<p>"
"Performing this function on a string or empty cell returns an error. "
""
"<p>"
""
""
""
"</description>"
"<seealso>EXP, LOG2, LOG10</seealso>")
};
static char *help_log10 = {
N_("<function>LOG10</function>"
"<syntax>LOG10(b1)</syntax>n"
"<description>"
"Computes the base-10 logarithm of b1. "
"<p>"
"Performing this function on a string or empty cell returns an error. "
""
"<p>"
""
""
""
"</description>"
"<seealso>EXP, LOG2, LOG</seealso>")
};
static char *help_log2 = {
N_("<function>LOG2</function>"
"<syntax>LOG2(b1)</syntax>n"
"<description>"
"Computes the base-2 logarithm of b1. "
"<p>"
"Performing this function on a string or empty cell returns an error. "
""
"<p>"
""
""
""
"</description>"
"<seealso>EXP, LOG10, LOG</seealso>")
};
static char *help_min = {
N_("<function>MIN</function>"
"<syntax>MIN(b1, b2, ...)</syntax>n"
"<description>"
"MIN returns the value of the element of the values passed "
"that has the smallest value. With negative numbers considered "
"smaller than positive numbers."
"<p>"
"Performing this function on a string or empty cell simply does nothing."
""
"<p>"
""
""
""
"</description>"
"<seealso>MAX,ABS</seealso>")
};
static char *help_max = {
N_("<function>MAX</function>"
"<syntax>MAX(b1, b2, ...)</syntax>n"
"<description>"
"MAX returns the value of the element of the values passed "
"that has the largest value. With negative numbers considered "
"smaller than positive numbers."
"<p>"
"Performing this function on a string or empty cell simply does nothing."
""
"<p>"
""
""
""
"</description>"
"<seealso>MIN,ABS</seealso>")
};
static char *help_radians = {
N_("<function>RADIANS</function>"
"<syntax>RADIANS(b1)</syntax>n"
"<description>"
"Computes the number of radians equilivent to "
"b1 degrees. "
"<p>"
"Performing this function on a string or empty cell simply does nothing. "
""
"<p>"
""
""
""
"</description>"
"<seealso>PI,DEGREES</seealso>")
};
static char *help_degrees = {
N_("<function>DEGREES</function>"
"<syntax>DEGREES(b1)</syntax>n"
"<description>"
"Computes the number of degrees equilivent to "
" b1 radians."
"<p>"
"Performing this function on a string or empty cell simply does nothing. "
""
"<p>"
""
""
""
"</description>"
"<seealso>RADIANS, PI</seealso>")
};
static char *help_sum = {
N_("<function>SUM</function>"
"<syntax>SUM(value1, value2, ...)</syntax>n"
"<description>"
"Computes the sum of all the values and cells referenced in the "
"argument list. "
"<p>"
"</description>"
"<seealso>AVERAGE, COUNT</seealso>")
};
static char *help_bin2dec = {
N_("<function>BIN2DEC(</function>"
"<syntax>BIN2DEC(b1)</syntax>n"
"<description>"
"The BIN2DEC function coverts a binary number "
"in string or number to its decimal equilivent."
"<p>"
"Performing this function on a string or empty cell simply does nothing."
"<p>"
""
""
""
"</description>"
"<seealso></seealso>")
};
static char *help_pi = {
N_("<function>PI</function>"
"<syntax>PI()</syntax>n"
"<description>The PI functions returns the value of Pi "
"as defined by M_PI."
"<p>"
"Performing this function on a string or empty cell"
"returns an error. This function is called with no arguments."
"<p>"
""
""
""
"</description>"
"<seealso></seealso>")
};
static char *help_floor = {
N_("<function>FLOOR</function>"
"<syntax>FLOOR(b1)</syntax>n"
......@@ -131,7 +691,7 @@ static char *help_floor = {
"<p>"
"</description>"
"<seealso>CEIL, ABS</seealso>")
"<seealso>CEIL, ABS, INT</seealso>")
};
static char *help_ceil = {
......@@ -146,7 +706,7 @@ static char *help_ceil = {
"<p>"
"</description>"
"<seealso>ABS, FLOOR</seealso>")
"<seealso>ABS, FLOOR, INT</seealso>")
};
static char *help_abs = {
......@@ -834,43 +1394,43 @@ gnumeric_pi (struct FunctionDefinition *i, Value *argv [], char **error_string)
FunctionDefinition math_functions [] = {
{ "abs", "f", "number", &help_abs, NULL, gnumeric_abs },
{ "acos", "f", "number", NULL, NULL, gnumeric_acos },
{ "acosh", "f", "number", NULL, NULL, gnumeric_acosh },
{ "acos", "f", "number", &help_acos, NULL, gnumeric_acos },
{ "acosh", "f", "number", &help_acosh, NULL, gnumeric_acosh },
{ "and", 0, "", &help_and, gnumeric_and, NULL },
{ "asin", "f", "number", NULL, NULL, gnumeric_asin },
{ "asinh", "f", "number", NULL, NULL, gnumeric_asinh },
{ "atan", "f", "number", NULL, NULL, gnumeric_atan },
{ "atanh", "f", "number", NULL, NULL, gnumeric_atanh },
{ "atan2", "ff", "xnum,ynum", NULL, NULL, gnumeric_atan2 },
{ "asin", "f", "number", &help_asin, NULL, gnumeric_asin },
{ "asinh", "f", "number", &help_asinh, NULL, gnumeric_asinh },
{ "atan", "f", "number", &help_atan, NULL, gnumeric_atan },
{ "atanh", "f", "number", &help_atanh, NULL, gnumeric_atanh },
{ "atan2", "ff", "xnum,ynum", &help_atan2, NULL, gnumeric_atan2 },