mirror of
https://github.com/ArashPartow/exprtk.git
synced 2025-06-12 16:27:23 +00:00
C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html
This commit is contained in:
@ -28,11 +28,14 @@ void fibonacci()
|
||||
typedef exprtk::expression<T> expression_t;
|
||||
typedef exprtk::parser<T> parser_t;
|
||||
typedef exprtk::function_compositor<T> compositor_t;
|
||||
typedef typename compositor_t::function function_t;
|
||||
|
||||
compositor_t compositor;
|
||||
|
||||
compositor
|
||||
.add("fibonacci",
|
||||
.add(
|
||||
function_t(
|
||||
"fibonacci",
|
||||
" var w := 0; "
|
||||
" var y := 0; "
|
||||
" var z := 1; "
|
||||
@ -49,7 +52,7 @@ void fibonacci()
|
||||
" z "
|
||||
" }; "
|
||||
" } ",
|
||||
"x");
|
||||
"x"));
|
||||
|
||||
T x = T(0);
|
||||
|
||||
|
Reference in New Issue
Block a user