C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html

This commit is contained in:
Arash Partow
2013-04-18 00:43:00 +10:00
parent 2a810cc9b4
commit e10cdcffcd
4 changed files with 215 additions and 77 deletions

View File

@ -33,21 +33,19 @@ void fibonacci()
compositor
.add("fibonacci_impl",
"switch "
"{ "
" case x == 0 : 0; "
" case x == 1 : 1; "
" default : "
" while (~(x := (x - 1)) > 0)"
" {~ "
" ( "
" w := z, "
" z := z + y, "
" y := w, "
" z "
" ) "
" }; "
"} ",
"switch "
"{ "
" case x == 0 : 0; "
" case x == 1 : 1; "
" default : "
" while ((x := (x - 1)) > 0)"
" { "
" w := z; "
" z := z + y; "
" y := w; "
" z "
" }; "
"} ",
"x","y","z","w");
compositor