Skip to content

gnilk/solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solver

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

Build

  1. Clone the repository
  2. From the cloned repository, create a build directory: mkdir bld/
  3. From the build directory: cmake ..
  4. Build the project: make
  5. Optional: sudo make install (on Linux)

Using as a command line tool

Example:

~user$ solve "3+2"
5, 0x5, %0101
~user$

Using as a library

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);
  }

About

Small expression solver library and command line tool

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors