summaryrefslogtreecommitdiff
path: root/src/mp-equation.c
diff options
context:
space:
mode:
authormbkma <[email protected]>2020-03-18 10:03:24 +0100
committerRobert Antoni Buj Gelonch <[email protected]>2020-03-18 21:11:17 +0100
commit197f53efa72f1710b95478f8960f0304a9b8f4cc (patch)
tree5c99bd90ff256e194360d9155cec4cc4c6436a65 /src/mp-equation.c
parent19711cb06c5bffee50084d3cbbbad48bbb2688bb (diff)
downloadmate-calc-197f53efa72f1710b95478f8960f0304a9b8f4cc.tar.bz2
mate-calc-197f53efa72f1710b95478f8960f0304a9b8f4cc.tar.xz
add Riemann zeta function and Gauss error function
Diffstat (limited to 'src/mp-equation.c')
-rw-r--r--src/mp-equation.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mp-equation.c b/src/mp-equation.c
index 4778298..df9d872 100644
--- a/src/mp-equation.c
+++ b/src/mp-equation.c
@@ -174,6 +174,7 @@ function_is_defined(ParserState *state, const char *name)
strcmp(lower_name, "sin⁻¹") == 0 || strcmp(lower_name, "cos⁻¹") == 0 || strcmp(lower_name, "tan⁻¹") == 0 ||
strcmp(lower_name, "sinh") == 0 || strcmp(lower_name, "cosh") == 0 || strcmp(lower_name, "tanh") == 0 ||
strcmp(lower_name, "sinh⁻¹") == 0 || strcmp(lower_name, "cosh⁻¹") == 0 || strcmp(lower_name, "tanh⁻¹") == 0 ||
+ strcmp(lower_name, "erf") == 0 || strcmp(lower_name, "zeta") == 0 ||
strcmp(lower_name, "asinh") == 0 || strcmp(lower_name, "acosh") == 0 || strcmp(lower_name, "atanh") == 0 ||
strcmp(lower_name, "ones") == 0 ||
strcmp(lower_name, "twos") == 0) {
@@ -261,6 +262,10 @@ get_function(ParserState *state, const char *name, const MPNumber *x, MPNumber *
mp_acosh(x, z);
else if (strcmp(lower_name, "tanh⁻¹") == 0 || strcmp(lower_name, "atanh") == 0)
mp_atanh(x, z);
+ else if (strcmp(lower_name, "erf") == 0)
+ mp_erf(x, z);
+ else if (strcmp(lower_name, "zeta") == 0)
+ mp_zeta(x, z);
else if (strcmp(lower_name, "ones") == 0)
mp_ones_complement(x, state->options->wordlen, z);
else if (strcmp(lower_name, "twos") == 0)