Inspired by the idea of the calculation class Eval from the MathGL library. Developed for use as part of the CAPSYS application.
The csformula contains case insensitive string parser. Let's imagine that you have a string, for example "(x^2+y)/sin(a*z)", and you pass it to the csformula constructor. Also, you know that, for example y=0.0000000000000000000000555, x=0.001, a=-1, z=-2. It is enough to call the Get(...) method or the GetD(...) for calculate to get the value of the expression or the derivative of the expression at this point.
Beta. Version: 1.0.0
If you don't have the Boost libraries you can get it from the official repository. For csformula there is no need to build Boost. Just download the version of Boost that you require.
Boost: Getting Started on Microsoft Windows Boost: Getting Started on Unix variants (e.g. Linux, MacOS) For example, on Linux you can go to the root directory of the project and run the following commands:
- wget -c 'http://sourceforge.net/projects/boost/files/boost/1.66.0/boost_1_66_0.tar.bz2/download'
 - tar xf download
 
After this operation the boost_1_66_0 directory appears in the root directory of the project.
To build csformula just run the following commands:
mkdir build && cd buildcmake -B../build -DBoost_INCLUDE_DIR:PATH=./boost_1_66_0 -DBOOST_ROOT:PATH=./boost_1_66_0 ..cmake --build . --target all
After building the library, you can find several files:
- build/bin/csformulalib
 - build/bin/csformulatest
 - build/bin/libcsformula.so
 
Header files:
- csformula/cseval.h
 - csformula/csformula.h
 
Each variable in the string can only be set as a single Latin character: ('a','b',...,'z'). The following operations are supported:
|&=><+-/*^sinasincosacostanatanlogsqrtexp
See examples and tests in the tests/csformulatest/csformulatest.cpp file.