Easy to use and flexible math expression parser / evaluator in a one file header only
MIT License
EzExpr is a easy to use and flexible expression parser / evaluator in a one file header only style for cpp11 at least
ez::Expr ev;
auto result0 = ev.parse("x + 2.5 * d").set("x", 0.5).set("d", 1.5).eval().getResult();
auto result1 = ev.set("x", 10.5).eval().getResult();
auto result2 = ev.set("d", 2.5).eval().getResult();
ez::Expr ev;
ev.addFunction("fma", [](double a, double b, double c) { return a*b+c; }); // ternary function
auto result0 = ev.parse("floor(fma(x,y,k))").set("x", 0.5).set("y", 1.5).set("k", 3.2).eval().getResult();
+ - * / ^ %
! (factorielle : N!)