Commit dec9c1a9 authored by Jukka-Pekka Iivonen's avatar Jukka-Pekka Iivonen Committed by jpekka

ERF() changed back to the previous form. Negative arguments are wrong.

1999-06-17  Jukka-Pekka Iivonen  <iivonen@iki.fi>

        * src/fn-eng.c (gnumeric_erf): ERF() changed back to the previous
        form.  Negative arguments are wrong.
parent 03f6be4d
1999-06-17 Jukka-Pekka Iivonen <iivonen@iki.fi>
* src/fn-eng.c (gnumeric_erf): ERF() changed back to the previous
form. Negative arguments are wrong.
1999-06-16 Morten Welinder <terra@diku.dk>
* src/complex.h, src/complex.c: New files.
......
1999-06-17 Jukka-Pekka Iivonen <iivonen@iki.fi>
* src/fn-eng.c (gnumeric_erf): ERF() changed back to the previous
form. Negative arguments are wrong.
1999-06-16 Morten Welinder <terra@diku.dk>
* src/complex.h, src/complex.c: New files.
......
1999-06-17 Jukka-Pekka Iivonen <iivonen@iki.fi>
* src/fn-eng.c (gnumeric_erf): ERF() changed back to the previous
form. Negative arguments are wrong.
1999-06-16 Morten Welinder <terra@diku.dk>
* src/complex.h, src/complex.c: New files.
......
1999-06-17 Jukka-Pekka Iivonen <iivonen@iki.fi>
* src/fn-eng.c (gnumeric_erf): ERF() changed back to the previous
form. Negative arguments are wrong.
1999-06-16 Morten Welinder <terra@diku.dk>
* src/complex.h, src/complex.c: New files.
......
1999-06-17 Jukka-Pekka Iivonen <iivonen@iki.fi>
* ms-formula-read.c (formula_func_data): LOG, ROMAN, TRUNC, and
BETADIST made var args.
1999-06-17 Michael Meeks <michael@edenproject.org>
* ms-formula-read.c (make_function): Added debug.
......
......@@ -183,7 +183,7 @@ FORMULA_FUNC_DATA formula_func_data[] =
/* 106 */ { "GETFORMULA", -2 },
/* 107 */ { "GETNAME", -2 },
/* 108 */ { "SETVALUE", -2 },
/* 109 */ { "LOG", 2 }, /* Base is optional */
/* 109 */ { "LOG", -1 }, /* Base is optional */
/* 110 */ { "EXEC", -2 },
/* 111 */ { "CHAR", 1 },
/* 112 */ { "LOWER", 1 },
......@@ -271,7 +271,7 @@ FORMULA_FUNC_DATA formula_func_data[] =
/* 194 */ { "VARP", -1 },
/* 195 */ { "DSTDEVP", 3 },
/* 196 */ { "DVARP", 3 },
/* 197 */ { "TRUNC", 2 }, /* num_digits is optional */
/* 197 */ { "TRUNC", -1 }, /* num_digits is optional */
/* 198 */ { "ISLOGICAL", 1 },
/* 199 */ { "DCOUNTA", 3 },
/* 200 */ { "DELETEBAR", -2 },
......@@ -344,7 +344,7 @@ FORMULA_FUNC_DATA formula_func_data[] =
/* 267 */ { "REGISTERID", },
/* 268 */ { "GETWORKBOOK", -2 },
/* 269 */ { "AVEDEV", -1 },
/* 270 */ { "BETADIST", 5 },
/* 270 */ { "BETADIST", -1 },
/* 271 */ { "GAMMALN", 1 },
/* 272 */ { "BETAINV", -1 },
/* 273 */ { "BINOMDIST", 4 },
......@@ -428,7 +428,7 @@ FORMULA_FUNC_DATA formula_func_data[] =
/* 351 */ { "DATEDIF", -2 },
/* 352 */ { "DATESTRING", -2 },
/* 353 */ { "NUMBERSTRING", -2 },
/* 354 */ { "ROMAN", 2 },
/* 354 */ { "ROMAN", -1 },
/* 355 */ { "OPENDIALOG", -2 },
/* 356 */ { "SAVEDIALOG", -2 },
/* 357 */ { "VIEWGET", -2 },
......
......@@ -1502,15 +1502,14 @@ gnumeric_erf (struct FunctionDefinition *i,
if (argv[1])
upper = value_get_as_float (argv[1]);
if (lower < 0.0)
ans = -erf(-lower);
else
ans = erf(lower);
if (lower < 0.0 || upper < 0.0) {
*error_string = gnumeric_err_NUM;
return NULL;
}
ans = erf(lower);
if (argv[1])
if (upper < 0.0)
ans = -erf(-upper) - ans;
else
ans = erf(upper) - ans;
ans = erf(upper) - ans;
return value_new_float (ans);
}
......
......@@ -1502,15 +1502,14 @@ gnumeric_erf (struct FunctionDefinition *i,
if (argv[1])
upper = value_get_as_float (argv[1]);
if (lower < 0.0)
ans = -erf(-lower);
else
ans = erf(lower);
if (lower < 0.0 || upper < 0.0) {
*error_string = gnumeric_err_NUM;
return NULL;
}
ans = erf(lower);
if (argv[1])
if (upper < 0.0)
ans = -erf(-upper) - ans;
else
ans = erf(upper) - ans;
ans = erf(upper) - ans;
return value_new_float (ans);
}
......
......@@ -1502,15 +1502,14 @@ gnumeric_erf (struct FunctionDefinition *i,
if (argv[1])
upper = value_get_as_float (argv[1]);
if (lower < 0.0)
ans = -erf(-lower);
else
ans = erf(lower);
if (lower < 0.0 || upper < 0.0) {
*error_string = gnumeric_err_NUM;
return NULL;
}
ans = erf(lower);
if (argv[1])
if (upper < 0.0)
ans = -erf(-upper) - ans;
else
ans = erf(upper) - ans;
ans = erf(upper) - ans;
return value_new_float (ans);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment