Fast modular expression evaluation in C++
2016-08-23
0 0 0
no vote
Other
Earn points
This is a fast modular expression evaluation in C++. It has no dependences on other libraries and will build using g++ on Linux / Mac / Android or using MSVC on Windows. It has a very simple interface:
CFloatExpression ex; // or CExpression<float> ex.Parse("1 + 1"); std::cout << ex.t_Evaluate() << std::endl; // prints 2It is a template, so it can be made to work with different types (int, float, double, complex, ...). It supports all the operators of "C" and the standard math.h functions. It also supports variables:
CFloatExpression ex; // or CExpression<float> ex.Parse("2 * pi() * r"); ex.SetVariable("r", 10); std::cout << ex.t_Evaluate() << std::endl; // prints 62.82... ex.SetVariable("r", 100); // set a
c++
Related Source Codes
Local Path Planning Algorithm - DWA Algorithm
0
0
no vote
enDAQ-Shock-Data-Share-SRS-Blog
0
0
no vote
Calling chatGPT in a Windows application
0
0
no vote
Test Hello world
0
0
no vote
RCS calculation by one-way ray tracing
0
0
no vote
No comment