### *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.
parent 70717960
 1998-09-21 Adrian Likins *src/fn-math.c: firat stab at fleshing out the help blurbs here. 1998-09-21 Miguel de Icaza * src/expr.c (do_expr_decode_tree): When decoding a tree, include ... ...
 1998-09-21 Adrian Likins *src/fn-math.c: firat stab at fleshing out the help blurbs here. 1998-09-21 Miguel de Icaza * src/expr.c (do_expr_decode_tree): When decoding a tree, include ... ...
 1998-09-21 Adrian Likins *src/fn-math.c: firat stab at fleshing out the help blurbs here. 1998-09-21 Miguel de Icaza * src/expr.c (do_expr_decode_tree): When decoding a tree, include ... ...
 1998-09-21 Adrian Likins *src/fn-math.c: firat stab at fleshing out the help blurbs here. 1998-09-21 Miguel de Icaza * 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_("ATAN2" "ATAN2(b1,b2)n" "" "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." "

" "Performing this function on a string or empty cell simply does nothing. " "This function only takes one argument." "

" "" "" "" "" "ATAN, ATANH, COS, SIN, DEGREES, RADIANS") }; static char *help_atanh = { N_("ATANH" "ATANH(b1)n" "" "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' " "

" "Performing this function on a string or empty cell simply does nothing. " "This function only takes one argument." "

" "" "" "" "" "ATAN, TAN, SIN, COS, DEGREES, RADIANS") }; static char *help_atan = { N_("ATAN" "ATAN(b1)n" "" "The ATAN function calculates the arc tangent of b1; that " " is the value whose tangent is b1." "Return value is in radians." "

" "Performing this function on a string or empty cell simply does nothing. " "This function only takes one argument." "

" "" "" "" "" "TAN, COS, SIN, DEGREES, RADIANS") }; static char *help_asinh = { N_("ASINH" "ASINH(b1)n" "" "The ASIN function calculates the inverse hyperbolic " " sine of b1; that is the value whose hyperbolic sine is b1. " "

" "Performing this function on a string or empty cell simply does nothing. " "This function only takes one argument." "

" "" "" "" "" "ASIN, SIN, COS, DEGREES, RADIANS") }; static char *help_asin = { N_("ASIN" "ASIN(b1)n" "" "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' " "

" "Performing this function on a string or empty cell simply does nothing. " "This function only takes one argument." "

" "" "" "" "" "SIN, COS, ASINH, DEGREES, RADIANS") }; static char *help_acosh = { N_("ACOSH" "ACOSH(b1)n" "" "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'" "

" "Performing this function on a string or empty cell simply does nothing. " "This function only takes one argument." "

" "" "" "" "" "ACOS, DEGREES, RADIANS ") }; static char *help_acos = { N_("ACOS" "ACOS(b1)n" "" "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. " "

" "Performing this function on a string or empty cell simply does nothing. " "This function only takes one argument." "

" "" "" "" "" "COS, SIN, DEGREES, RADIANS") }; static char *help_tanh = { N_("TANH" "TANH(b1)n" "" " The TANH function returns the hyperbolic tangent of b1, " " which is defined mathematically as sinh(b1) / cosh(b1). " "

" "Performing this function on a string or empty cell simply does nothing. " "This function only takes one argument." "

" "" "" "" "" "TAN, SIN, SINH, COS, COSH, DEGREES, RADIANS") }; static char *help_tan = { N_("TAN" "TAN(b1)n" "" "The TAN function returns the tangent of b1, where b1 is " "given in radians. " "

" "Performing this function on a string or empty cell simply does nothing. " "This function only takes one argument." "

" "" "" "" "" "TANH, COS, COSH, SIN, SINH, DEGREES, RADIANS") }; static char *help_sinh = { N_("SINH" "SINH(b1)n" "" "The SINH function returns the hyperbolic sine of b1, " "which is defined mathematically as (exp(b1) - exp(-b1)) / 2. " " b1 is in radians. " "

" "Performing this function on a string or empty cell simply does nothing. " "This function only takes one argument." "

" "" "" "" "" "SIN, COS, COSH, TAN, TANH, DEGREES, RADIANS, EXP") }; static char *help_cosh = { N_("COSH" "COSH(b1)n" "" "The COSH function returns the hyperbolic cosine of b1, " " which is defined mathematically as (exp(b1) + exp(-b1)) / 2. " " b1 is in radians. " "

" "Performing this function on a string or empty cell simply does nothing. " "This function only takes one argument." "

" "" "" "" "" "COS, SIN, SINH, TAN, TANH, RADIANS, DEGREES, EXP") }; static char *help_sin = { N_("SIN" "SIN(b1)n" "" "The SIN function returns the sine of b1, where b1 is given " " in radians. " "

" "Performing this function on a string or empty cell simply does nothing. " "This function only takes one argument." "

" "" "" "" "" "COS, COSH, SINH, TAN, TANH, RADIANS, DEGREES") }; static char *help_cos = { N_("COS" "COS(b1)n" "" "The COS function returns the cosine of b1, where b1 is " "given in radians. " "

" "Performing this function on a string or empty cell simply does nothing. " "This function only takes one argument." "

" "" "" "" "" "COSH, SIN, SINH, TAN, TANH, RADIANS, DEGREES") }; static char *help_int = { N_("INT" "INT(b1, b2, ...)n" "" "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. " "

" "Performing this function on a string or empty cell simply does nothing." "" "

" "" "" "" "" "FLOOR, CEIL, ABS") }; static char *help_count = { N_("COUNT" "COUNT(b1, b2, ...)n" "" "Returns the total number of arguments passed." "

" "Performing this function on a string or empty cell simply does nothing." "" "

" "" "" "" "" "AVERAGE") }; static char *help_fact = { N_("FACT" "FACT(b1)n" "" "Computes the factorial of b1. ie, b1!" "

" "Performing this function on a string or empty cell returns an error" "" "

" "`Factorials were someone's attempt to make math *look* exciting. ` --Steven Wright " "" "" "" "") }; static char *help_exp = { N_("EXP" "EXP(b1)n" "" "Computes the value of e(the base of natural logarithmns) raised " "to the power of b1. " "

" "Performing this function on a string or empty cell returns an error." "" "

" "" "" "" "" "LOG, LOG2, LOG10") }; static char *help_log = { N_("LOG" "LOG(b1)n" "" "Computes the natural logarithm of b1. " "

" "Performing this function on a string or empty cell returns an error. " "" "

" "" "" "" "" "EXP, LOG2, LOG10") }; static char *help_log10 = { N_("LOG10" "LOG10(b1)n" "" "Computes the base-10 logarithm of b1. " "

" "Performing this function on a string or empty cell returns an error. " "" "

" "" "" "" "" "EXP, LOG2, LOG") }; static char *help_log2 = { N_("LOG2" "LOG2(b1)n" "" "Computes the base-2 logarithm of b1. " "

" "Performing this function on a string or empty cell returns an error. " "" "

" "" "" "" "" "EXP, LOG10, LOG") }; static char *help_min = { N_("MIN" "MIN(b1, b2, ...)n" "" "MIN returns the value of the element of the values passed " "that has the smallest value. With negative numbers considered " "smaller than positive numbers." "

" "Performing this function on a string or empty cell simply does nothing." "" "

" "" "" "" "" "MAX,ABS") }; static char *help_max = { N_("MAX" "MAX(b1, b2, ...)n" "" "MAX returns the value of the element of the values passed " "that has the largest value. With negative numbers considered " "smaller than positive numbers." "

" "Performing this function on a string or empty cell simply does nothing." "" "

" "" "" "" "" "MIN,ABS") }; static char *help_radians = { N_("RADIANS" "RADIANS(b1)n" "" "Computes the number of radians equilivent to " "b1 degrees. " "

" "Performing this function on a string or empty cell simply does nothing. " "" "

" "" "" "" "" "PI,DEGREES") }; static char *help_degrees = { N_("DEGREES" "DEGREES(b1)n" "" "Computes the number of degrees equilivent to " " b1 radians." "

" "Performing this function on a string or empty cell simply does nothing. " "" "

" "" "" "" "" "RADIANS, PI") }; static char *help_sum = { N_("SUM" "SUM(value1, value2, ...)n" "" "Computes the sum of all the values and cells referenced in the " "argument list. " "

" "" "AVERAGE, COUNT") }; static char *help_bin2dec = { N_("BIN2DEC(" "BIN2DEC(b1)n" "" "The BIN2DEC function coverts a binary number " "in string or number to its decimal equilivent." "

" "Performing this function on a string or empty cell simply does nothing." "

" "" "" "" "" "") }; static char *help_pi = { N_("PI" "PI()n" "The PI functions returns the value of Pi " "as defined by M_PI." "

" "Performing this function on a string or empty cell" "returns an error. This function is called with no arguments." "

" "" "" "" "" "") }; static char *help_floor = { N_("FLOOR" "FLOOR(b1)n" ... ... @@ -131,7 +691,7 @@ static char *help_floor = { "

" "" "CEIL, ABS") "CEIL, ABS, INT") }; static char *help_ceil = { ... ... @@ -146,7 +706,7 @@ static char *help_ceil = { "

" "" "ABS, FLOOR") "ABS, FLOOR, INT") }; 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 },