Questions tagged [exprtk]

Tag for the C++ Mathematical Expression Library

Tag for the C++ Mathematical Expression Library at http://www.partow.net/programming/exprtk/index.html

22 questions
18
votes
3 answers

Evaluate a math expression in Qt

I'm trying to create a Qt application and I need a math expression evaluator to evaluate things like this e.g. (4+5)*2-9/3. I included the .hpp file of this library (http://www.partow.net/programming/exprtk/) to my project in the Qt Creator and…
Green Fireman
  • 587
  • 9
  • 22
17
votes
1 answer

Simple Math Expression in ExprTk

I am attempting to use a simple expression such as the following and the result should be that the value of z becomes 1. However nothing seems to be happening any suggestions on how I could resolve this issue ? template void…
MistyD
  • 13,289
  • 28
  • 108
  • 198
14
votes
2 answers

ExprTk with increased precision

I am trying to compile the ExprTk library with more precision than long double. I thought the simplist would be to try GCC's __float128 but I am getting the following compilation error and am not sure how to correct it. exprtk.hpp: In instantiation…
chew socks
  • 1,306
  • 1
  • 13
  • 31
11
votes
1 answer

Exprtk parser not working on VS 2015?

I am trying to use the parser from this site: http://www.partow.net/programming/exprtk/ on VS 2015. Unfortunately, I get the following error while compiling exprtk_simple_example_01 (one of the example files included in the download with the…
Revist
  • 153
  • 9
11
votes
1 answer

compile win32 library from exprtk

I would like to compile a win32 .dll or .lib from http://partow.net/programming/exprtk/index.html math expression library. What is the easiest way to do that ? I'm using MS VC++. The code has only one .hpp that has all the code. Each time I compile…
knocker_d
  • 474
  • 6
  • 15
11
votes
2 answers

Using exprtk in a multithreaded program

I need to write a program in which string expressions are evaluated quite frequently. An example of an expression is below: "x0*a0*a0+x1*a1+x2*a2+x3*a3+x4*a4....." The expressions can be long and a string can contain multiple such expressions. I…
user1274878
  • 1,105
  • 1
  • 21
  • 49
9
votes
2 answers

Are variables case-sensitive in exprtk?

When I define an expression in my exprtk string, like var x := sqrt(y); and I try to add another variable var X := 2*z; do I get a conflict? Thanks in advance.
9
votes
1 answer

troubles with compiling a c++ file including exprTk

I have some troubles compiling a c++ code including exprtk. I want to compile an given example of the package (I called it parser.cpp): #include #include #include "exprtk.hpp" template void trig_function() { …
Daniel
  • 268
  • 2
  • 11
6
votes
1 answer

ExprTk: Does an expression has to be recompiled when its values change

I'm creating an expression with exprtk using variables which change constantly. Do I have to reset and recompile the exprtk::expression using an updated exprtk::symbol_table everytime I change the value of a variable? Or are the updated values…
Roi Danton
  • 5,515
  • 4
  • 44
  • 62
6
votes
0 answers

Problems with including math parser "exprtk"

Instead of programming a math parser myself, I'm trying to implement the exprtk (exprtk) into my project. It works fine if I implement it in a console project. However, it fails in my CLR project. The error says "Debug Assertion Failed [...]…
5
votes
0 answers

C++ exprtk - can it be used within a class?

I want to call a function of a class from exprtk. (http://www.partow.net/programming/exprtk/) I want to register a function with this toolkit with symbol_table.add_function. Therefore it is required to derive my class like this from ifunction…
Ernie Mur
  • 350
  • 1
  • 15
5
votes
1 answer

ExprTK unknown variable resolution depending on expression type

I am trying to create a parser for boolean expressions. The symbols inside the expression are read from an XML-like data structure. It is simple to implement a parser for something like a.b == 'some value' using ExprTK by using a "unknown symbol…
Philipp
  • 10,577
  • 5
  • 57
  • 111
3
votes
2 answers

C++ and ExprTk parser "use of deleted function" error

I'm trying to use the ExprTk mathematical expression parser library within a class whose objects are to be stored in a vector of objects, which is a member variable of another class; however, when I try to push_back a new object in the vector I'm…
jjw
  • 41
  • 4
3
votes
1 answer

ExprTk, get a list of symbols/variables in expression

I want to get a list of the symbols out of an expression in ExprTk (not the ones I registered, but the ones that are in the expression. E.g. when the expression is const std::string expression_string = "abs(sin(x)^2+5*y)"; I need to get x and y as…
goaran
  • 293
  • 1
  • 10
2
votes
2 answers

Get vector from exprTk as output

I can't seem to get a vector output from exprTk. I figure it should be relatively simple but in the manual I can only find how to input a vector and not how to output one. What I currently have is the following: typedef double T; // numeric type…
D.J. Klomp
  • 2,099
  • 1
  • 13
  • 25
1
2