Simple expression solver. Use it as a library or as a command line tool.
NOTE: In order to build and run unit tests you need: https://github.com/gnilk/testrunner
- Clone the repository
- From the cloned repository, create a build directory:
mkdir bld/ - From the build directory:
cmake .. - Build the project:
make - Optional:
sudo make install(on Linux)
~user$ solve "3+2"
5, 0x5, %0101
~user$
Look at the solver.cpp or tests/test_expsolver.cpp files they contain enough information to get going.
double tmp;
if (ExpSolver::Solve(&tmp, "3+2")) {
printf("Result: %f\n", tmp);
}