Skip to content

Very simple expression evaluator using shunting-yard algorithm and RPN (C++11)

License

Notifications You must be signed in to change notification settings

r-lyeh-archived/eval

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Eval

Very simple expression evaluator using shunting-yard algorithm and RPN (C++11).

API

// public api: evaluate string
double eval( const std::string &expr, std::string *err = 0 );

Showcase

#include "eval.hpp"
int main() {
    double var = eval("sin(11+12-13*(14)/15)"); // var == -0.991703
}

Changelog

  • v1.0.3 (2016/05/21): Fix name clash on OSX
  • v1.0.2 (2016/05/19): Fix out-of-range iterator access
  • v1.0.1 (2016/03/26): Add simple support for assignment and variables
  • v1.0.0 (2016/02/20): Extra math stuff; Header-only now; Initial SemVer adherence;

About

Very simple expression evaluator using shunting-yard algorithm and RPN (C++11)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 100.0%