Questions tagged [mxparser]

Questions about mXparser published on http://mathparser.org/.

5 questions
0
votes
1 answer

mXparser's iff() conditional does not support equality test

I'm using the Java/.NET symbolic math library mXparser (5.0.2) to support user-provided math expressions in my app. Problem I found that the conditional clause iff does not support equality test, e.g., var f = new Function("f(x1, x2) = x1 +…
kakyo
  • 10,460
  • 14
  • 76
  • 140
0
votes
1 answer

mXparser - how to determine the token type of a user defined argument

Using the library https://mathparser.org/mxparser-tutorial/playing-with-expression-tokens/ Assume I have the follow functions: val origEl = Expression("revenue - cogs") origEl.copyOfInitialTokens // this returns an array of `Token` What is the…
echen
  • 2,002
  • 1
  • 24
  • 38
0
votes
1 answer

mxparser performance for single expression evaluated multiple times

I have a scenario where I need to evaluate one expression 1 million times, but on each iteration the only things that do change are the argument values: var x1 = new Argument("X1", double.NaN); var x2 = new Argument("X2", double.NaN); var x3 = new…
herme 0
  • 912
  • 1
  • 9
  • 23
0
votes
2 answers

mXparser result rounding

I am trying out mXparser in an android app and I almost have it working. But, if I parse the following expression "10/3" then it returns: 3.33333333335. Why this rounding in the end? and how do I tell mXparser to return 3.33333333333 instead? I am…
7heViking
  • 7,137
  • 11
  • 50
  • 94
-1
votes
1 answer

Can I make mXparser algorithm run faster

I made a basic graph plotter in Java using the mXparser library. Now, it does its job just fine, the only problem is that the program itself takes about 2.5 seconds to draw a basic function, like x^2. Can I somehow optimize the algorithm so that it…