mirror of
https://github.com/ArashPartow/exprtk.git
synced 2025-06-12 16:27:23 +00:00
C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html
This commit is contained in:
@ -30,7 +30,7 @@ const std::string expression_list[] = {
|
||||
"(y + x / y) * (x - y / x)",
|
||||
"x / ((x + y) * (x - y)) / y",
|
||||
"1 - ((x * y) + (y / x)) - 3",
|
||||
"1.1x^1 + 2.2y^2 - 3.3x^3 + 4.4y^4 - 5.5x^5 + 6.6y^6",
|
||||
"1.1x^1 + 2.2y^2 - 3.3x^3 + 4.4y^15 - 5.5x^23 + 6.6y^55",
|
||||
"sin(2 * x) + cos(pi / y)",
|
||||
"1 - sin(2 * x) + cos(pi / y)",
|
||||
"sqrt(1 - sin(2 * x) + cos(pi / y) / 3)",
|
||||
@ -114,7 +114,7 @@ template <typename T> inline T func02(const T& x, const T& y) { return (T(2.0) *
|
||||
template <typename T> inline T func03(const T& x, const T& y) { return (y + x / y) * (x - y / x); }
|
||||
template <typename T> inline T func04(const T& x, const T& y) { return x / ((x + y) * (x - y)) / y; }
|
||||
template <typename T> inline T func05(const T& x, const T& y) { return T(1.0) - ((x * y) + (y / x)) - T(3.0); }
|
||||
template <typename T> inline T func06(const T& x, const T& y) { return (1.1*pow(x,T(1.0))+2.2*pow(y,T(2.0))-3.3*pow(x,T(3.0))+4.4*pow(y,T(4.0))-5.5*pow(x,T(5.0))+6.6*pow(y,T(6.0))); }
|
||||
template <typename T> inline T func06(const T& x, const T& y) { return (1.1*pow(x,T(1.0))+2.2*pow(y,T(2.0))-3.3*pow(x,T(3.0))+4.4*pow(y,T(15.0))-5.5*pow(x,T(23.0))+6.6*pow(y,T(55.0))); }
|
||||
template <typename T> inline T func07(const T& x, const T& y) { return std::sin(T(2.0) * x) + std::cos(pi / y); }
|
||||
template <typename T> inline T func08(const T& x, const T& y) { return T(1.0) - std::sin(2.0 * x) + std::cos(pi / y); }
|
||||
template <typename T> inline T func09(const T& x, const T& y) { return std::sqrt(T(1.0) - std::sin(T(2.0) * x) + std::cos(pi / y) / T(3.0)); }
|
||||
|
Reference in New Issue
Block a user