C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html
This commit is contained in:
parent
700b5b2a11
commit
390be015c3
430
exprtk.hpp
430
exprtk.hpp
|
@ -419,7 +419,7 @@ namespace exprtk
|
|||
template <typename T>
|
||||
inline T equal_impl(const T v0, const T v1, real_type_tag)
|
||||
{
|
||||
static const T epsilon = T(0.00000000001);
|
||||
static const T epsilon = T(0.0000000001);
|
||||
return (std::abs(v0 - v1) <= (std::max(T(1),std::max(std::abs(v0),std::abs(v1))) * epsilon)) ? T(1) : T(0);
|
||||
}
|
||||
|
||||
|
@ -2724,8 +2724,8 @@ namespace exprtk
|
|||
e_sf84 = 1084, e_sf85 = 1085, e_sf86 = 1086, e_sf87 = 1087,
|
||||
e_sf88 = 1088, e_sf89 = 1089, e_sf90 = 1090, e_sf91 = 1091,
|
||||
e_sf92 = 1092, e_sf93 = 1093, e_sf94 = 1094, e_sf95 = 1095,
|
||||
e_sf96 = 1096, e_sf97 = 1097,
|
||||
e_sffinal = 1098,
|
||||
e_sf96 = 1096, e_sf97 = 1097, e_sf98 = 1098,
|
||||
e_sffinal = 1099,
|
||||
e_sf4ext00 = 2000, e_sf4ext01 = 2001, e_sf4ext02 = 2002, e_sf4ext03 = 2003,
|
||||
e_sf4ext04 = 2004, e_sf4ext05 = 2005, e_sf4ext06 = 2006, e_sf4ext07 = 2007,
|
||||
e_sf4ext08 = 2008, e_sf4ext09 = 2009, e_sf4ext10 = 2010, e_sf4ext11 = 2011,
|
||||
|
@ -3836,82 +3836,83 @@ namespace exprtk
|
|||
template <typename T> struct sf19_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return x * (y - z); } static inline std::string id() { return "t*(t-t)";} };
|
||||
template <typename T> struct sf20_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return x * (y * z); } static inline std::string id() { return "t*(t*t)";} };
|
||||
template <typename T> struct sf21_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return x * (y / z); } static inline std::string id() { return "t*(t/t)";} };
|
||||
template <typename T> struct sf22_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return x - (y / z); } static inline std::string id() { return "t-(t/t)";} };
|
||||
template <typename T> struct sf23_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return x - (y / z); } static inline std::string id() { return "t-(t/t)";} };
|
||||
template <typename T> struct sf24_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return x - (y * z); } static inline std::string id() { return "t-(t*t)";} };
|
||||
template <typename T> struct sf25_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return x + (y * z); } static inline std::string id() { return "t+(t*t)";} };
|
||||
template <typename T> struct sf26_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return x + (y / z); } static inline std::string id() { return "t+(t/t)";} };
|
||||
template <typename T> struct sf27_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return x + (y + z); } static inline std::string id() { return "t+(t+t)";} };
|
||||
template <typename T> struct sf28_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return x + (y - z); } static inline std::string id() { return "t+(t-t)";} };
|
||||
template <typename T> struct sf29_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return axnb<T,2>(x,y,z); } }; //x * y^2 + z
|
||||
template <typename T> struct sf30_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return axnb<T,3>(x,y,z); } }; //x * y^3 + z
|
||||
template <typename T> struct sf31_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return axnb<T,4>(x,y,z); } }; //x * y^4 + z
|
||||
template <typename T> struct sf32_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return axnb<T,5>(x,y,z); } }; //x * y^5 + z
|
||||
template <typename T> struct sf33_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return axnb<T,6>(x,y,z); } }; //x * y^6 + z
|
||||
template <typename T> struct sf34_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return axnb<T,7>(x,y,z); } }; //x * y^7 + z
|
||||
template <typename T> struct sf35_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return axnb<T,8>(x,y,z); } }; //x * y^8 + z
|
||||
template <typename T> struct sf36_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return axnb<T,9>(x,y,z); } }; //x * y^9 + z
|
||||
template <typename T> struct sf37_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return x * numeric::log(y) + z; } };
|
||||
template <typename T> struct sf38_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return x * numeric::log(y) - z; } };
|
||||
template <typename T> struct sf39_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return x * numeric::log10(y) + z; } };
|
||||
template <typename T> struct sf40_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return x * numeric::log10(y) - z; } };
|
||||
template <typename T> struct sf41_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return x * numeric::sin(y) + z; } };
|
||||
template <typename T> struct sf42_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return x * numeric::sin(y) - z; } };
|
||||
template <typename T> struct sf43_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return x * numeric::cos(y) + z; } };
|
||||
template <typename T> struct sf44_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return x * numeric::cos(y) - z; } };
|
||||
template <typename T> struct sf45_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return is_true(x) ? y : z; } };
|
||||
template <typename T> struct sf46_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x + ((y + z) / w); } static inline std::string id() { return "t+((t+t)/t)";} };
|
||||
template <typename T> struct sf47_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x + ((y + z) * w); } static inline std::string id() { return "t+((t+t)*t)";} };
|
||||
template <typename T> struct sf48_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x + ((y - z) / w); } static inline std::string id() { return "t+((t-t)/t)";} };
|
||||
template <typename T> struct sf49_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x + ((y - z) * w); } static inline std::string id() { return "t+((t-t)*t)";} };
|
||||
template <typename T> struct sf50_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x + ((y * z) / w); } static inline std::string id() { return "t+((t*t)/t)";} };
|
||||
template <typename T> struct sf51_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x + ((y * z) * w); } static inline std::string id() { return "t+((t*t)*t)";} };
|
||||
template <typename T> struct sf52_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x + ((y / z) + w); } static inline std::string id() { return "t+((t/t)+t)";} };
|
||||
template <typename T> struct sf53_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x + ((y / z) / w); } static inline std::string id() { return "t+((t/t)/t)";} };
|
||||
template <typename T> struct sf54_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x + ((y / z) * w); } static inline std::string id() { return "t+((t/t)*t)";} };
|
||||
template <typename T> struct sf55_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x - ((y + z) / w); } static inline std::string id() { return "t-((t+t)/t)";} };
|
||||
template <typename T> struct sf56_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x - ((y + z) * w); } static inline std::string id() { return "t-((t+t)*t)";} };
|
||||
template <typename T> struct sf57_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x - ((y - z) / w); } static inline std::string id() { return "t-((t-t)/t)";} };
|
||||
template <typename T> struct sf58_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x - ((y - z) * w); } static inline std::string id() { return "t-((t-t)*t)";} };
|
||||
template <typename T> struct sf59_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x - ((y * z) / w); } static inline std::string id() { return "t-((t*t)/t)";} };
|
||||
template <typename T> struct sf60_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x - ((y * z) * w); } static inline std::string id() { return "t-((t*t)*t)";} };
|
||||
template <typename T> struct sf61_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x - ((y / z) / w); } static inline std::string id() { return "t-((t/t)/t)";} };
|
||||
template <typename T> struct sf62_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x - ((y / z) * w); } static inline std::string id() { return "t-((t/t)*t)";} };
|
||||
template <typename T> struct sf63_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return ((x + y) * z) - w; } static inline std::string id() { return "((t+t)*t)-t";} };
|
||||
template <typename T> struct sf64_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return ((x - y) * z) - w; } static inline std::string id() { return "((t-t)*t)-t";} };
|
||||
template <typename T> struct sf65_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return ((x * y) * z) - w; } static inline std::string id() { return "((t*t)*t)-t";} };
|
||||
template <typename T> struct sf66_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return ((x / y) * z) - w; } static inline std::string id() { return "((t/t)*t)-t";} };
|
||||
template <typename T> struct sf67_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return ((x + y) / z) - w; } static inline std::string id() { return "((t+t)/t)-t";} };
|
||||
template <typename T> struct sf68_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return ((x - y) / z) - w; } static inline std::string id() { return "((t-t)/t)-t";} };
|
||||
template <typename T> struct sf69_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return ((x * y) / z) - w; } static inline std::string id() { return "((t*t)/t)-t";} };
|
||||
template <typename T> struct sf70_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return ((x / y) / z) - w; } static inline std::string id() { return "((t/t)/t)-t";} };
|
||||
template <typename T> struct sf71_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x * y) + (z * w); } static inline std::string id() { return "(t*t)+(t*t)";} };
|
||||
template <typename T> struct sf72_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x * y) - (z * w); } static inline std::string id() { return "(t*t)-(t*t)";} };
|
||||
template <typename T> struct sf73_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x * y) + (z / w); } static inline std::string id() { return "(t*t)+(t/t)";} };
|
||||
template <typename T> struct sf74_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x * y) - (z / w); } static inline std::string id() { return "(t*t)-(t/t)";} };
|
||||
template <typename T> struct sf75_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x / y) + (z / w); } static inline std::string id() { return "(t/t)+(t/t)";} };
|
||||
template <typename T> struct sf76_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x / y) - (z / w); } static inline std::string id() { return "(t/t)-(t/t)";} };
|
||||
template <typename T> struct sf77_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x / y) - (z * w); } static inline std::string id() { return "(t/t)-(t*t)";} };
|
||||
template <typename T> struct sf78_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x / (y + (z * w)); } static inline std::string id() { return "t/(t+(t*t))";} };
|
||||
template <typename T> struct sf79_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x / (y - (z * w)); } static inline std::string id() { return "t/(t-(t*t))";} };
|
||||
template <typename T> struct sf80_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x * (y + (z * w)); } static inline std::string id() { return "t*(t+(t*t))";} };
|
||||
template <typename T> struct sf81_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x * (y - (z * w)); } static inline std::string id() { return "t*(t-(t*t))";} };
|
||||
template <typename T> struct sf82_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return axn<T,2>(x,y) + axn<T,2>(z,w); } }; //x*y^2+z*w^2
|
||||
template <typename T> struct sf83_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return axn<T,3>(x,y) + axn<T,3>(z,w); } }; //x*y^3+z*w^3
|
||||
template <typename T> struct sf84_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return axn<T,4>(x,y) + axn<T,4>(z,w); } }; //x*y^4+z*w^4
|
||||
template <typename T> struct sf85_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return axn<T,5>(x,y) + axn<T,5>(z,w); } }; //x*y^5+z*w^5
|
||||
template <typename T> struct sf86_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return axn<T,6>(x,y) + axn<T,6>(z,w); } }; //x*y^6+z*w^6
|
||||
template <typename T> struct sf87_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return axn<T,7>(x,y) + axn<T,7>(z,w); } }; //x*y^7+z*w^7
|
||||
template <typename T> struct sf88_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return axn<T,8>(x,y) + axn<T,8>(z,w); } }; //x*y^8+z*w^8
|
||||
template <typename T> struct sf89_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return axn<T,9>(x,y) + axn<T,9>(z,w); } }; //x*y^9+z*w^9
|
||||
template <typename T> struct sf90_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (is_true(x) && is_true(y)) ? z : w; } };
|
||||
template <typename T> struct sf91_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (is_true(x) || is_true(y)) ? z : w; } };
|
||||
template <typename T> struct sf92_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x < y) ? z : w; } };
|
||||
template <typename T> struct sf93_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x <= y) ? z : w; } };
|
||||
template <typename T> struct sf94_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x > y) ? z : w; } };
|
||||
template <typename T> struct sf95_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x >= y) ? z : w; } };
|
||||
template <typename T> struct sf96_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return numeric::equal(x,y) ? z : w; } };
|
||||
template <typename T> struct sf97_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x * numeric::sin(y) + z * numeric::cos(w); } };
|
||||
template <typename T> struct sf22_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return x - (y + z); } static inline std::string id() { return "t-(t+t)";} };
|
||||
template <typename T> struct sf23_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return x - (y - z); } static inline std::string id() { return "t-(t-t)";} };
|
||||
template <typename T> struct sf24_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return x - (y / z); } static inline std::string id() { return "t-(t/t)";} };
|
||||
template <typename T> struct sf25_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return x - (y * z); } static inline std::string id() { return "t-(t*t)";} };
|
||||
template <typename T> struct sf26_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return x + (y * z); } static inline std::string id() { return "t+(t*t)";} };
|
||||
template <typename T> struct sf27_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return x + (y / z); } static inline std::string id() { return "t+(t/t)";} };
|
||||
template <typename T> struct sf28_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return x + (y + z); } static inline std::string id() { return "t+(t+t)";} };
|
||||
template <typename T> struct sf29_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return x + (y - z); } static inline std::string id() { return "t+(t-t)";} };
|
||||
template <typename T> struct sf30_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return axnb<T,2>(x,y,z); } }; //x * y^2 + z
|
||||
template <typename T> struct sf31_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return axnb<T,3>(x,y,z); } }; //x * y^3 + z
|
||||
template <typename T> struct sf32_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return axnb<T,4>(x,y,z); } }; //x * y^4 + z
|
||||
template <typename T> struct sf33_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return axnb<T,5>(x,y,z); } }; //x * y^5 + z
|
||||
template <typename T> struct sf34_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return axnb<T,6>(x,y,z); } }; //x * y^6 + z
|
||||
template <typename T> struct sf35_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return axnb<T,7>(x,y,z); } }; //x * y^7 + z
|
||||
template <typename T> struct sf36_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return axnb<T,8>(x,y,z); } }; //x * y^8 + z
|
||||
template <typename T> struct sf37_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return axnb<T,9>(x,y,z); } }; //x * y^9 + z
|
||||
template <typename T> struct sf38_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return x * numeric::log(y) + z; } };
|
||||
template <typename T> struct sf39_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return x * numeric::log(y) - z; } };
|
||||
template <typename T> struct sf40_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return x * numeric::log10(y) + z; } };
|
||||
template <typename T> struct sf41_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return x * numeric::log10(y) - z; } };
|
||||
template <typename T> struct sf42_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return x * numeric::sin(y) + z; } };
|
||||
template <typename T> struct sf43_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return x * numeric::sin(y) - z; } };
|
||||
template <typename T> struct sf44_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return x * numeric::cos(y) + z; } };
|
||||
template <typename T> struct sf45_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return x * numeric::cos(y) - z; } };
|
||||
template <typename T> struct sf46_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z) { return is_true(x) ? y : z; } };
|
||||
template <typename T> struct sf47_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x + ((y + z) / w); } static inline std::string id() { return "t+((t+t)/t)";} };
|
||||
template <typename T> struct sf48_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x + ((y + z) * w); } static inline std::string id() { return "t+((t+t)*t)";} };
|
||||
template <typename T> struct sf49_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x + ((y - z) / w); } static inline std::string id() { return "t+((t-t)/t)";} };
|
||||
template <typename T> struct sf50_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x + ((y - z) * w); } static inline std::string id() { return "t+((t-t)*t)";} };
|
||||
template <typename T> struct sf51_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x + ((y * z) / w); } static inline std::string id() { return "t+((t*t)/t)";} };
|
||||
template <typename T> struct sf52_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x + ((y * z) * w); } static inline std::string id() { return "t+((t*t)*t)";} };
|
||||
template <typename T> struct sf53_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x + ((y / z) + w); } static inline std::string id() { return "t+((t/t)+t)";} };
|
||||
template <typename T> struct sf54_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x + ((y / z) / w); } static inline std::string id() { return "t+((t/t)/t)";} };
|
||||
template <typename T> struct sf55_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x + ((y / z) * w); } static inline std::string id() { return "t+((t/t)*t)";} };
|
||||
template <typename T> struct sf56_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x - ((y + z) / w); } static inline std::string id() { return "t-((t+t)/t)";} };
|
||||
template <typename T> struct sf57_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x - ((y + z) * w); } static inline std::string id() { return "t-((t+t)*t)";} };
|
||||
template <typename T> struct sf58_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x - ((y - z) / w); } static inline std::string id() { return "t-((t-t)/t)";} };
|
||||
template <typename T> struct sf59_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x - ((y - z) * w); } static inline std::string id() { return "t-((t-t)*t)";} };
|
||||
template <typename T> struct sf60_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x - ((y * z) / w); } static inline std::string id() { return "t-((t*t)/t)";} };
|
||||
template <typename T> struct sf61_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x - ((y * z) * w); } static inline std::string id() { return "t-((t*t)*t)";} };
|
||||
template <typename T> struct sf62_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x - ((y / z) / w); } static inline std::string id() { return "t-((t/t)/t)";} };
|
||||
template <typename T> struct sf63_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x - ((y / z) * w); } static inline std::string id() { return "t-((t/t)*t)";} };
|
||||
template <typename T> struct sf64_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return ((x + y) * z) - w; } static inline std::string id() { return "((t+t)*t)-t";} };
|
||||
template <typename T> struct sf65_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return ((x - y) * z) - w; } static inline std::string id() { return "((t-t)*t)-t";} };
|
||||
template <typename T> struct sf66_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return ((x * y) * z) - w; } static inline std::string id() { return "((t*t)*t)-t";} };
|
||||
template <typename T> struct sf67_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return ((x / y) * z) - w; } static inline std::string id() { return "((t/t)*t)-t";} };
|
||||
template <typename T> struct sf68_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return ((x + y) / z) - w; } static inline std::string id() { return "((t+t)/t)-t";} };
|
||||
template <typename T> struct sf69_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return ((x - y) / z) - w; } static inline std::string id() { return "((t-t)/t)-t";} };
|
||||
template <typename T> struct sf70_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return ((x * y) / z) - w; } static inline std::string id() { return "((t*t)/t)-t";} };
|
||||
template <typename T> struct sf71_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return ((x / y) / z) - w; } static inline std::string id() { return "((t/t)/t)-t";} };
|
||||
template <typename T> struct sf72_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x * y) + (z * w); } static inline std::string id() { return "(t*t)+(t*t)";} };
|
||||
template <typename T> struct sf73_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x * y) - (z * w); } static inline std::string id() { return "(t*t)-(t*t)";} };
|
||||
template <typename T> struct sf74_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x * y) + (z / w); } static inline std::string id() { return "(t*t)+(t/t)";} };
|
||||
template <typename T> struct sf75_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x * y) - (z / w); } static inline std::string id() { return "(t*t)-(t/t)";} };
|
||||
template <typename T> struct sf76_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x / y) + (z / w); } static inline std::string id() { return "(t/t)+(t/t)";} };
|
||||
template <typename T> struct sf77_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x / y) - (z / w); } static inline std::string id() { return "(t/t)-(t/t)";} };
|
||||
template <typename T> struct sf78_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x / y) - (z * w); } static inline std::string id() { return "(t/t)-(t*t)";} };
|
||||
template <typename T> struct sf79_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x / (y + (z * w)); } static inline std::string id() { return "t/(t+(t*t))";} };
|
||||
template <typename T> struct sf80_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x / (y - (z * w)); } static inline std::string id() { return "t/(t-(t*t))";} };
|
||||
template <typename T> struct sf81_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x * (y + (z * w)); } static inline std::string id() { return "t*(t+(t*t))";} };
|
||||
template <typename T> struct sf82_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x * (y - (z * w)); } static inline std::string id() { return "t*(t-(t*t))";} };
|
||||
template <typename T> struct sf83_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return axn<T,2>(x,y) + axn<T,2>(z,w); } }; //x*y^2+z*w^2
|
||||
template <typename T> struct sf84_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return axn<T,3>(x,y) + axn<T,3>(z,w); } }; //x*y^3+z*w^3
|
||||
template <typename T> struct sf85_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return axn<T,4>(x,y) + axn<T,4>(z,w); } }; //x*y^4+z*w^4
|
||||
template <typename T> struct sf86_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return axn<T,5>(x,y) + axn<T,5>(z,w); } }; //x*y^5+z*w^5
|
||||
template <typename T> struct sf87_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return axn<T,6>(x,y) + axn<T,6>(z,w); } }; //x*y^6+z*w^6
|
||||
template <typename T> struct sf88_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return axn<T,7>(x,y) + axn<T,7>(z,w); } }; //x*y^7+z*w^7
|
||||
template <typename T> struct sf89_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return axn<T,8>(x,y) + axn<T,8>(z,w); } }; //x*y^8+z*w^8
|
||||
template <typename T> struct sf90_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return axn<T,9>(x,y) + axn<T,9>(z,w); } }; //x*y^9+z*w^9
|
||||
template <typename T> struct sf91_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (is_true(x) && is_true(y)) ? z : w; } };
|
||||
template <typename T> struct sf92_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (is_true(x) || is_true(y)) ? z : w; } };
|
||||
template <typename T> struct sf93_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x < y) ? z : w; } };
|
||||
template <typename T> struct sf94_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x <= y) ? z : w; } };
|
||||
template <typename T> struct sf95_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x > y) ? z : w; } };
|
||||
template <typename T> struct sf96_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x >= y) ? z : w; } };
|
||||
template <typename T> struct sf97_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return numeric::equal(x,y) ? z : w; } };
|
||||
template <typename T> struct sf98_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return x * numeric::sin(y) + z * numeric::cos(w); } };
|
||||
|
||||
template <typename T> struct sfext00_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x + y) - (z * w); } static inline std::string id() { return "(t+t)-(t*t)";} };
|
||||
template <typename T> struct sfext01_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x + y) - (z / w); } static inline std::string id() { return "(t+t)-(t/t)";} };
|
||||
|
@ -3922,13 +3923,13 @@ namespace exprtk
|
|||
template <typename T> struct sfext06_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x - y) - (z * w); } static inline std::string id() { return "(t-t)-(t*t)";} };
|
||||
template <typename T> struct sfext07_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x - y) - (z / w); } static inline std::string id() { return "(t-t)-(t/t)";} };
|
||||
template <typename T> struct sfext08_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x + y) - (z - w); } static inline std::string id() { return "(t+t)-(t-t)";} };
|
||||
template <typename T> struct sfext09_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x + y) - (z - w); } static inline std::string id() { return "(t+t)-(t-t)";} };
|
||||
template <typename T> struct sfext10_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x + y) + (z - w); } static inline std::string id() { return "(t+t)+(t-t)";} };
|
||||
template <typename T> struct sfext11_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x + y) + (z - w); } static inline std::string id() { return "(t+t)+(t-t)";} };
|
||||
template <typename T> struct sfext09_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x + y) + (z - w); } static inline std::string id() { return "(t+t)+(t-t)";} };
|
||||
template <typename T> struct sfext10_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x + y) * (z - w); } static inline std::string id() { return "(t+t)-(t-t)";} };
|
||||
template <typename T> struct sfext11_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x + y) / (z - w); } static inline std::string id() { return "(t+t)/(t-t)";} };
|
||||
template <typename T> struct sfext12_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x - y) - (z + w); } static inline std::string id() { return "(t-t)-(t+t)";} };
|
||||
template <typename T> struct sfext13_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x - y) - (z + w); } static inline std::string id() { return "(t-t)-(t+t)";} };
|
||||
template <typename T> struct sfext14_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x - y) + (z + w); } static inline std::string id() { return "(t-t)+(t+t)";} };
|
||||
template <typename T> struct sfext15_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x - y) + (z + w); } static inline std::string id() { return "(t-t)+(t+t)";} };
|
||||
template <typename T> struct sfext13_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x - y) + (z + w); } static inline std::string id() { return "(t-t)+(t+t)";} };
|
||||
template <typename T> struct sfext14_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x - y) * (z + w); } static inline std::string id() { return "(t-t)*(t+t)";} };
|
||||
template <typename T> struct sfext15_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x - y) / (z + w); } static inline std::string id() { return "(t-t)/(t+t)";} };
|
||||
template <typename T> struct sfext16_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x * y) - (z + w); } static inline std::string id() { return "(t*t)-(t+t)";} };
|
||||
template <typename T> struct sfext17_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x / y) - (z + w); } static inline std::string id() { return "(t/t)-(t+t)";} };
|
||||
template <typename T> struct sfext18_op : public sf_base<T> { typedef typename sf_base<T>::Type Type; static inline T process(Type x, Type y, Type z, Type w) { return (x * y) + (z + w); } static inline std::string id() { return "(t*t)+(t+t)";} };
|
||||
|
@ -9163,7 +9164,7 @@ namespace exprtk
|
|||
return error_node();
|
||||
}
|
||||
|
||||
const std::size_t sf_3_to_4 = details::e_sf46;
|
||||
const std::size_t sf_3_to_4 = details::e_sf47;
|
||||
const details::operator_type opt_type = details::operator_type(id + 1000);
|
||||
const std::size_t NumberOfParameters = (id < (sf_3_to_4 - 1000)) ? 3 : 4;
|
||||
|
||||
|
@ -10080,6 +10081,7 @@ namespace exprtk
|
|||
case_stmt(details::e_sf40,details::sf40_op) case_stmt(details::e_sf41,details::sf41_op)
|
||||
case_stmt(details::e_sf42,details::sf42_op) case_stmt(details::e_sf43,details::sf43_op)
|
||||
case_stmt(details::e_sf44,details::sf44_op) case_stmt(details::e_sf45,details::sf45_op)
|
||||
case_stmt(details::e_sf46,details::sf46_op)
|
||||
#undef case_stmt
|
||||
default : return error_node();
|
||||
}
|
||||
|
@ -10120,6 +10122,7 @@ namespace exprtk
|
|||
case_stmt(details::e_sf40,details::sf40_op) case_stmt(details::e_sf41,details::sf41_op)
|
||||
case_stmt(details::e_sf42,details::sf42_op) case_stmt(details::e_sf43,details::sf43_op)
|
||||
case_stmt(details::e_sf44,details::sf44_op) case_stmt(details::e_sf45,details::sf45_op)
|
||||
case_stmt(details::e_sf46,details::sf46_op)
|
||||
#undef case_stmt
|
||||
default : return error_node();
|
||||
}
|
||||
|
@ -10160,6 +10163,7 @@ namespace exprtk
|
|||
case_stmt(details::e_sf40,details::sf40_op) case_stmt(details::e_sf41,details::sf41_op)
|
||||
case_stmt(details::e_sf42,details::sf42_op) case_stmt(details::e_sf43,details::sf43_op)
|
||||
case_stmt(details::e_sf44,details::sf44_op) case_stmt(details::e_sf45,details::sf45_op)
|
||||
case_stmt(details::e_sf46,details::sf46_op)
|
||||
#undef case_stmt
|
||||
default : return error_node();
|
||||
}
|
||||
|
@ -10171,32 +10175,32 @@ namespace exprtk
|
|||
switch (operation)
|
||||
{
|
||||
#define case_stmt(op0,op1) case op0 : temp_node = node_allocator_->allocate<details::sf4_node<Type,op1<Type> > >(operation,branch); break;
|
||||
case_stmt(details::e_sf46,details::sf46_op) case_stmt(details::e_sf47,details::sf47_op)
|
||||
case_stmt(details::e_sf48,details::sf48_op) case_stmt(details::e_sf49,details::sf49_op)
|
||||
case_stmt(details::e_sf50,details::sf50_op) case_stmt(details::e_sf51,details::sf51_op)
|
||||
case_stmt(details::e_sf52,details::sf52_op) case_stmt(details::e_sf53,details::sf53_op)
|
||||
case_stmt(details::e_sf54,details::sf54_op) case_stmt(details::e_sf55,details::sf55_op)
|
||||
case_stmt(details::e_sf56,details::sf56_op) case_stmt(details::e_sf57,details::sf57_op)
|
||||
case_stmt(details::e_sf58,details::sf58_op) case_stmt(details::e_sf59,details::sf59_op)
|
||||
case_stmt(details::e_sf60,details::sf60_op) case_stmt(details::e_sf61,details::sf61_op)
|
||||
case_stmt(details::e_sf62,details::sf62_op) case_stmt(details::e_sf63,details::sf63_op)
|
||||
case_stmt(details::e_sf64,details::sf64_op) case_stmt(details::e_sf65,details::sf65_op)
|
||||
case_stmt(details::e_sf66,details::sf66_op) case_stmt(details::e_sf67,details::sf67_op)
|
||||
case_stmt(details::e_sf68,details::sf68_op) case_stmt(details::e_sf69,details::sf69_op)
|
||||
case_stmt(details::e_sf70,details::sf70_op) case_stmt(details::e_sf71,details::sf71_op)
|
||||
case_stmt(details::e_sf72,details::sf72_op) case_stmt(details::e_sf73,details::sf73_op)
|
||||
case_stmt(details::e_sf74,details::sf74_op) case_stmt(details::e_sf75,details::sf75_op)
|
||||
case_stmt(details::e_sf76,details::sf76_op) case_stmt(details::e_sf77,details::sf77_op)
|
||||
case_stmt(details::e_sf78,details::sf78_op) case_stmt(details::e_sf79,details::sf79_op)
|
||||
case_stmt(details::e_sf80,details::sf80_op) case_stmt(details::e_sf81,details::sf81_op)
|
||||
case_stmt(details::e_sf82,details::sf82_op) case_stmt(details::e_sf83,details::sf83_op)
|
||||
case_stmt(details::e_sf84,details::sf84_op) case_stmt(details::e_sf85,details::sf85_op)
|
||||
case_stmt(details::e_sf86,details::sf86_op) case_stmt(details::e_sf87,details::sf87_op)
|
||||
case_stmt(details::e_sf88,details::sf88_op) case_stmt(details::e_sf89,details::sf89_op)
|
||||
case_stmt(details::e_sf90,details::sf90_op) case_stmt(details::e_sf91,details::sf91_op)
|
||||
case_stmt(details::e_sf92,details::sf92_op) case_stmt(details::e_sf93,details::sf93_op)
|
||||
case_stmt(details::e_sf94,details::sf94_op) case_stmt(details::e_sf95,details::sf95_op)
|
||||
case_stmt(details::e_sf96,details::sf96_op) case_stmt(details::e_sf97,details::sf97_op)
|
||||
case_stmt(details::e_sf47,details::sf47_op) case_stmt(details::e_sf48,details::sf48_op)
|
||||
case_stmt(details::e_sf49,details::sf49_op) case_stmt(details::e_sf50,details::sf50_op)
|
||||
case_stmt(details::e_sf51,details::sf51_op) case_stmt(details::e_sf52,details::sf52_op)
|
||||
case_stmt(details::e_sf53,details::sf53_op) case_stmt(details::e_sf54,details::sf54_op)
|
||||
case_stmt(details::e_sf55,details::sf55_op) case_stmt(details::e_sf56,details::sf56_op)
|
||||
case_stmt(details::e_sf57,details::sf57_op) case_stmt(details::e_sf58,details::sf58_op)
|
||||
case_stmt(details::e_sf59,details::sf59_op) case_stmt(details::e_sf60,details::sf60_op)
|
||||
case_stmt(details::e_sf61,details::sf61_op) case_stmt(details::e_sf62,details::sf62_op)
|
||||
case_stmt(details::e_sf63,details::sf63_op) case_stmt(details::e_sf64,details::sf64_op)
|
||||
case_stmt(details::e_sf65,details::sf65_op) case_stmt(details::e_sf66,details::sf66_op)
|
||||
case_stmt(details::e_sf67,details::sf67_op) case_stmt(details::e_sf68,details::sf68_op)
|
||||
case_stmt(details::e_sf69,details::sf69_op) case_stmt(details::e_sf70,details::sf70_op)
|
||||
case_stmt(details::e_sf71,details::sf71_op) case_stmt(details::e_sf72,details::sf72_op)
|
||||
case_stmt(details::e_sf73,details::sf73_op) case_stmt(details::e_sf74,details::sf74_op)
|
||||
case_stmt(details::e_sf75,details::sf75_op) case_stmt(details::e_sf76,details::sf76_op)
|
||||
case_stmt(details::e_sf77,details::sf77_op) case_stmt(details::e_sf78,details::sf78_op)
|
||||
case_stmt(details::e_sf79,details::sf79_op) case_stmt(details::e_sf80,details::sf80_op)
|
||||
case_stmt(details::e_sf81,details::sf81_op) case_stmt(details::e_sf82,details::sf82_op)
|
||||
case_stmt(details::e_sf83,details::sf83_op) case_stmt(details::e_sf84,details::sf84_op)
|
||||
case_stmt(details::e_sf85,details::sf85_op) case_stmt(details::e_sf86,details::sf86_op)
|
||||
case_stmt(details::e_sf87,details::sf87_op) case_stmt(details::e_sf88,details::sf88_op)
|
||||
case_stmt(details::e_sf89,details::sf89_op) case_stmt(details::e_sf90,details::sf90_op)
|
||||
case_stmt(details::e_sf91,details::sf91_op) case_stmt(details::e_sf92,details::sf92_op)
|
||||
case_stmt(details::e_sf93,details::sf93_op) case_stmt(details::e_sf94,details::sf94_op)
|
||||
case_stmt(details::e_sf95,details::sf95_op) case_stmt(details::e_sf96,details::sf96_op)
|
||||
case_stmt(details::e_sf97,details::sf97_op) case_stmt(details::e_sf98,details::sf98_op)
|
||||
#undef case_stmt
|
||||
default : return error_node();
|
||||
}
|
||||
|
@ -10214,32 +10218,32 @@ namespace exprtk
|
|||
switch (operation)
|
||||
{
|
||||
#define case_stmt(op0,op1) case op0 : return node_allocator_->allocate_rrrr<details::sf4_var_node<Type,op1<Type> > >(v0,v1,v2,v3);
|
||||
case_stmt(details::e_sf46,details::sf46_op) case_stmt(details::e_sf47,details::sf47_op)
|
||||
case_stmt(details::e_sf48,details::sf48_op) case_stmt(details::e_sf49,details::sf49_op)
|
||||
case_stmt(details::e_sf50,details::sf50_op) case_stmt(details::e_sf51,details::sf51_op)
|
||||
case_stmt(details::e_sf52,details::sf52_op) case_stmt(details::e_sf53,details::sf53_op)
|
||||
case_stmt(details::e_sf54,details::sf54_op) case_stmt(details::e_sf55,details::sf55_op)
|
||||
case_stmt(details::e_sf56,details::sf56_op) case_stmt(details::e_sf57,details::sf57_op)
|
||||
case_stmt(details::e_sf58,details::sf58_op) case_stmt(details::e_sf59,details::sf59_op)
|
||||
case_stmt(details::e_sf60,details::sf60_op) case_stmt(details::e_sf61,details::sf61_op)
|
||||
case_stmt(details::e_sf62,details::sf62_op) case_stmt(details::e_sf63,details::sf63_op)
|
||||
case_stmt(details::e_sf64,details::sf64_op) case_stmt(details::e_sf65,details::sf65_op)
|
||||
case_stmt(details::e_sf66,details::sf66_op) case_stmt(details::e_sf67,details::sf67_op)
|
||||
case_stmt(details::e_sf68,details::sf68_op) case_stmt(details::e_sf69,details::sf69_op)
|
||||
case_stmt(details::e_sf70,details::sf70_op) case_stmt(details::e_sf71,details::sf71_op)
|
||||
case_stmt(details::e_sf72,details::sf72_op) case_stmt(details::e_sf73,details::sf73_op)
|
||||
case_stmt(details::e_sf74,details::sf74_op) case_stmt(details::e_sf75,details::sf75_op)
|
||||
case_stmt(details::e_sf76,details::sf76_op) case_stmt(details::e_sf77,details::sf77_op)
|
||||
case_stmt(details::e_sf78,details::sf78_op) case_stmt(details::e_sf79,details::sf79_op)
|
||||
case_stmt(details::e_sf80,details::sf80_op) case_stmt(details::e_sf81,details::sf81_op)
|
||||
case_stmt(details::e_sf82,details::sf82_op) case_stmt(details::e_sf83,details::sf83_op)
|
||||
case_stmt(details::e_sf84,details::sf84_op) case_stmt(details::e_sf85,details::sf85_op)
|
||||
case_stmt(details::e_sf86,details::sf86_op) case_stmt(details::e_sf87,details::sf87_op)
|
||||
case_stmt(details::e_sf88,details::sf88_op) case_stmt(details::e_sf89,details::sf89_op)
|
||||
case_stmt(details::e_sf90,details::sf90_op) case_stmt(details::e_sf91,details::sf91_op)
|
||||
case_stmt(details::e_sf92,details::sf92_op) case_stmt(details::e_sf93,details::sf93_op)
|
||||
case_stmt(details::e_sf94,details::sf94_op) case_stmt(details::e_sf95,details::sf95_op)
|
||||
case_stmt(details::e_sf96,details::sf96_op) case_stmt(details::e_sf97,details::sf97_op)
|
||||
case_stmt(details::e_sf47,details::sf47_op) case_stmt(details::e_sf48,details::sf48_op)
|
||||
case_stmt(details::e_sf49,details::sf49_op) case_stmt(details::e_sf50,details::sf50_op)
|
||||
case_stmt(details::e_sf51,details::sf51_op) case_stmt(details::e_sf52,details::sf52_op)
|
||||
case_stmt(details::e_sf53,details::sf53_op) case_stmt(details::e_sf54,details::sf54_op)
|
||||
case_stmt(details::e_sf55,details::sf55_op) case_stmt(details::e_sf56,details::sf56_op)
|
||||
case_stmt(details::e_sf57,details::sf57_op) case_stmt(details::e_sf58,details::sf58_op)
|
||||
case_stmt(details::e_sf59,details::sf59_op) case_stmt(details::e_sf60,details::sf60_op)
|
||||
case_stmt(details::e_sf61,details::sf61_op) case_stmt(details::e_sf62,details::sf62_op)
|
||||
case_stmt(details::e_sf63,details::sf63_op) case_stmt(details::e_sf64,details::sf64_op)
|
||||
case_stmt(details::e_sf65,details::sf65_op) case_stmt(details::e_sf66,details::sf66_op)
|
||||
case_stmt(details::e_sf67,details::sf67_op) case_stmt(details::e_sf68,details::sf68_op)
|
||||
case_stmt(details::e_sf69,details::sf69_op) case_stmt(details::e_sf70,details::sf70_op)
|
||||
case_stmt(details::e_sf71,details::sf71_op) case_stmt(details::e_sf72,details::sf72_op)
|
||||
case_stmt(details::e_sf73,details::sf73_op) case_stmt(details::e_sf74,details::sf74_op)
|
||||
case_stmt(details::e_sf75,details::sf75_op) case_stmt(details::e_sf76,details::sf76_op)
|
||||
case_stmt(details::e_sf77,details::sf77_op) case_stmt(details::e_sf78,details::sf78_op)
|
||||
case_stmt(details::e_sf79,details::sf79_op) case_stmt(details::e_sf80,details::sf80_op)
|
||||
case_stmt(details::e_sf81,details::sf81_op) case_stmt(details::e_sf82,details::sf82_op)
|
||||
case_stmt(details::e_sf83,details::sf83_op) case_stmt(details::e_sf84,details::sf84_op)
|
||||
case_stmt(details::e_sf85,details::sf85_op) case_stmt(details::e_sf86,details::sf86_op)
|
||||
case_stmt(details::e_sf87,details::sf87_op) case_stmt(details::e_sf88,details::sf88_op)
|
||||
case_stmt(details::e_sf89,details::sf89_op) case_stmt(details::e_sf90,details::sf90_op)
|
||||
case_stmt(details::e_sf91,details::sf91_op) case_stmt(details::e_sf92,details::sf92_op)
|
||||
case_stmt(details::e_sf93,details::sf93_op) case_stmt(details::e_sf94,details::sf94_op)
|
||||
case_stmt(details::e_sf95,details::sf95_op) case_stmt(details::e_sf96,details::sf96_op)
|
||||
case_stmt(details::e_sf97,details::sf97_op) case_stmt(details::e_sf98,details::sf98_op)
|
||||
#undef case_stmt
|
||||
default : return error_node();
|
||||
}
|
||||
|
@ -10256,32 +10260,32 @@ namespace exprtk
|
|||
switch (operation)
|
||||
{
|
||||
#define case_stmt(op0,op1) case op0 : return node_allocator_->allocate<details::sf4_node<Type,op1<Type> > >(operation,branch);
|
||||
case_stmt(details::e_sf46,details::sf46_op) case_stmt(details::e_sf47,details::sf47_op)
|
||||
case_stmt(details::e_sf48,details::sf48_op) case_stmt(details::e_sf49,details::sf49_op)
|
||||
case_stmt(details::e_sf50,details::sf50_op) case_stmt(details::e_sf51,details::sf51_op)
|
||||
case_stmt(details::e_sf52,details::sf52_op) case_stmt(details::e_sf53,details::sf53_op)
|
||||
case_stmt(details::e_sf54,details::sf54_op) case_stmt(details::e_sf55,details::sf55_op)
|
||||
case_stmt(details::e_sf56,details::sf56_op) case_stmt(details::e_sf57,details::sf57_op)
|
||||
case_stmt(details::e_sf58,details::sf58_op) case_stmt(details::e_sf59,details::sf59_op)
|
||||
case_stmt(details::e_sf60,details::sf60_op) case_stmt(details::e_sf61,details::sf61_op)
|
||||
case_stmt(details::e_sf62,details::sf62_op) case_stmt(details::e_sf63,details::sf63_op)
|
||||
case_stmt(details::e_sf64,details::sf64_op) case_stmt(details::e_sf65,details::sf65_op)
|
||||
case_stmt(details::e_sf66,details::sf66_op) case_stmt(details::e_sf67,details::sf67_op)
|
||||
case_stmt(details::e_sf68,details::sf68_op) case_stmt(details::e_sf69,details::sf69_op)
|
||||
case_stmt(details::e_sf70,details::sf70_op) case_stmt(details::e_sf71,details::sf71_op)
|
||||
case_stmt(details::e_sf72,details::sf72_op) case_stmt(details::e_sf73,details::sf73_op)
|
||||
case_stmt(details::e_sf74,details::sf74_op) case_stmt(details::e_sf75,details::sf75_op)
|
||||
case_stmt(details::e_sf76,details::sf76_op) case_stmt(details::e_sf77,details::sf77_op)
|
||||
case_stmt(details::e_sf78,details::sf78_op) case_stmt(details::e_sf79,details::sf79_op)
|
||||
case_stmt(details::e_sf80,details::sf80_op) case_stmt(details::e_sf81,details::sf81_op)
|
||||
case_stmt(details::e_sf82,details::sf82_op) case_stmt(details::e_sf83,details::sf83_op)
|
||||
case_stmt(details::e_sf84,details::sf84_op) case_stmt(details::e_sf85,details::sf85_op)
|
||||
case_stmt(details::e_sf86,details::sf86_op) case_stmt(details::e_sf87,details::sf87_op)
|
||||
case_stmt(details::e_sf88,details::sf88_op) case_stmt(details::e_sf89,details::sf89_op)
|
||||
case_stmt(details::e_sf90,details::sf90_op) case_stmt(details::e_sf91,details::sf91_op)
|
||||
case_stmt(details::e_sf92,details::sf92_op) case_stmt(details::e_sf93,details::sf93_op)
|
||||
case_stmt(details::e_sf94,details::sf94_op) case_stmt(details::e_sf95,details::sf95_op)
|
||||
case_stmt(details::e_sf96,details::sf96_op) case_stmt(details::e_sf97,details::sf97_op)
|
||||
case_stmt(details::e_sf47,details::sf47_op) case_stmt(details::e_sf48,details::sf48_op)
|
||||
case_stmt(details::e_sf49,details::sf49_op) case_stmt(details::e_sf50,details::sf50_op)
|
||||
case_stmt(details::e_sf51,details::sf51_op) case_stmt(details::e_sf52,details::sf52_op)
|
||||
case_stmt(details::e_sf53,details::sf53_op) case_stmt(details::e_sf54,details::sf54_op)
|
||||
case_stmt(details::e_sf55,details::sf55_op) case_stmt(details::e_sf56,details::sf56_op)
|
||||
case_stmt(details::e_sf57,details::sf57_op) case_stmt(details::e_sf58,details::sf58_op)
|
||||
case_stmt(details::e_sf59,details::sf59_op) case_stmt(details::e_sf60,details::sf60_op)
|
||||
case_stmt(details::e_sf61,details::sf61_op) case_stmt(details::e_sf62,details::sf62_op)
|
||||
case_stmt(details::e_sf63,details::sf63_op) case_stmt(details::e_sf64,details::sf64_op)
|
||||
case_stmt(details::e_sf65,details::sf65_op) case_stmt(details::e_sf66,details::sf66_op)
|
||||
case_stmt(details::e_sf67,details::sf67_op) case_stmt(details::e_sf68,details::sf68_op)
|
||||
case_stmt(details::e_sf69,details::sf69_op) case_stmt(details::e_sf70,details::sf70_op)
|
||||
case_stmt(details::e_sf71,details::sf71_op) case_stmt(details::e_sf72,details::sf72_op)
|
||||
case_stmt(details::e_sf73,details::sf73_op) case_stmt(details::e_sf74,details::sf74_op)
|
||||
case_stmt(details::e_sf75,details::sf75_op) case_stmt(details::e_sf76,details::sf76_op)
|
||||
case_stmt(details::e_sf77,details::sf77_op) case_stmt(details::e_sf78,details::sf78_op)
|
||||
case_stmt(details::e_sf79,details::sf79_op) case_stmt(details::e_sf80,details::sf80_op)
|
||||
case_stmt(details::e_sf81,details::sf81_op) case_stmt(details::e_sf82,details::sf82_op)
|
||||
case_stmt(details::e_sf83,details::sf83_op) case_stmt(details::e_sf84,details::sf84_op)
|
||||
case_stmt(details::e_sf85,details::sf85_op) case_stmt(details::e_sf86,details::sf86_op)
|
||||
case_stmt(details::e_sf87,details::sf87_op) case_stmt(details::e_sf88,details::sf88_op)
|
||||
case_stmt(details::e_sf89,details::sf89_op) case_stmt(details::e_sf90,details::sf90_op)
|
||||
case_stmt(details::e_sf91,details::sf91_op) case_stmt(details::e_sf92,details::sf92_op)
|
||||
case_stmt(details::e_sf93,details::sf93_op) case_stmt(details::e_sf94,details::sf94_op)
|
||||
case_stmt(details::e_sf95,details::sf95_op) case_stmt(details::e_sf96,details::sf96_op)
|
||||
case_stmt(details::e_sf97,details::sf97_op) case_stmt(details::e_sf98,details::sf98_op)
|
||||
#undef case_stmt
|
||||
default : return error_node();
|
||||
}
|
||||
|
@ -10701,7 +10705,7 @@ namespace exprtk
|
|||
case_stmt(details::e_sf22,details::sf22_op) case_stmt(details::e_sf23,details::sf23_op)
|
||||
case_stmt(details::e_sf24,details::sf24_op) case_stmt(details::e_sf25,details::sf25_op)
|
||||
case_stmt(details::e_sf26,details::sf26_op) case_stmt(details::e_sf27,details::sf27_op)
|
||||
case_stmt(details::e_sf28,details::sf28_op)
|
||||
case_stmt(details::e_sf28,details::sf28_op) case_stmt(details::e_sf29,details::sf29_op)
|
||||
#undef case_stmt
|
||||
default : return error_node();
|
||||
}
|
||||
|
@ -10733,24 +10737,24 @@ namespace exprtk
|
|||
switch (sf4opr)
|
||||
{
|
||||
#define case_stmt(op0,op1) case op0 : return details::T0oT1oT2oT3_sf4ext<Type,T0,T1,T2,T3,op1<Type> >::allocate(*(expr_gen.node_allocator_),t0,t1,t2,t3);
|
||||
case_stmt(details::e_sf46,details::sf46_op) case_stmt(details::e_sf47,details::sf47_op)
|
||||
case_stmt(details::e_sf48,details::sf48_op) case_stmt(details::e_sf49,details::sf49_op)
|
||||
case_stmt(details::e_sf50,details::sf50_op) case_stmt(details::e_sf51,details::sf51_op)
|
||||
case_stmt(details::e_sf52,details::sf52_op) case_stmt(details::e_sf53,details::sf53_op)
|
||||
case_stmt(details::e_sf54,details::sf54_op) case_stmt(details::e_sf55,details::sf55_op)
|
||||
case_stmt(details::e_sf56,details::sf56_op) case_stmt(details::e_sf57,details::sf57_op)
|
||||
case_stmt(details::e_sf58,details::sf58_op) case_stmt(details::e_sf59,details::sf59_op)
|
||||
case_stmt(details::e_sf60,details::sf60_op) case_stmt(details::e_sf61,details::sf61_op)
|
||||
case_stmt(details::e_sf62,details::sf62_op) case_stmt(details::e_sf63,details::sf63_op)
|
||||
case_stmt(details::e_sf64,details::sf64_op) case_stmt(details::e_sf65,details::sf65_op)
|
||||
case_stmt(details::e_sf66,details::sf66_op) case_stmt(details::e_sf67,details::sf67_op)
|
||||
case_stmt(details::e_sf68,details::sf68_op) case_stmt(details::e_sf69,details::sf69_op)
|
||||
case_stmt(details::e_sf70,details::sf70_op) case_stmt(details::e_sf71,details::sf71_op)
|
||||
case_stmt(details::e_sf72,details::sf72_op) case_stmt(details::e_sf73,details::sf73_op)
|
||||
case_stmt(details::e_sf74,details::sf74_op) case_stmt(details::e_sf75,details::sf75_op)
|
||||
case_stmt(details::e_sf76,details::sf76_op) case_stmt(details::e_sf77,details::sf77_op)
|
||||
case_stmt(details::e_sf78,details::sf78_op) case_stmt(details::e_sf79,details::sf79_op)
|
||||
case_stmt(details::e_sf80,details::sf80_op) case_stmt(details::e_sf81,details::sf81_op)
|
||||
case_stmt(details::e_sf47,details::sf47_op) case_stmt(details::e_sf48,details::sf48_op)
|
||||
case_stmt(details::e_sf49,details::sf49_op) case_stmt(details::e_sf50,details::sf50_op)
|
||||
case_stmt(details::e_sf51,details::sf51_op) case_stmt(details::e_sf52,details::sf52_op)
|
||||
case_stmt(details::e_sf53,details::sf53_op) case_stmt(details::e_sf54,details::sf54_op)
|
||||
case_stmt(details::e_sf55,details::sf55_op) case_stmt(details::e_sf56,details::sf56_op)
|
||||
case_stmt(details::e_sf57,details::sf57_op) case_stmt(details::e_sf58,details::sf58_op)
|
||||
case_stmt(details::e_sf59,details::sf59_op) case_stmt(details::e_sf60,details::sf60_op)
|
||||
case_stmt(details::e_sf61,details::sf61_op) case_stmt(details::e_sf62,details::sf62_op)
|
||||
case_stmt(details::e_sf63,details::sf63_op) case_stmt(details::e_sf64,details::sf64_op)
|
||||
case_stmt(details::e_sf65,details::sf65_op) case_stmt(details::e_sf66,details::sf66_op)
|
||||
case_stmt(details::e_sf67,details::sf67_op) case_stmt(details::e_sf68,details::sf68_op)
|
||||
case_stmt(details::e_sf69,details::sf69_op) case_stmt(details::e_sf70,details::sf70_op)
|
||||
case_stmt(details::e_sf71,details::sf71_op) case_stmt(details::e_sf72,details::sf72_op)
|
||||
case_stmt(details::e_sf73,details::sf73_op) case_stmt(details::e_sf74,details::sf74_op)
|
||||
case_stmt(details::e_sf75,details::sf75_op) case_stmt(details::e_sf76,details::sf76_op)
|
||||
case_stmt(details::e_sf77,details::sf77_op) case_stmt(details::e_sf78,details::sf78_op)
|
||||
case_stmt(details::e_sf79,details::sf79_op) case_stmt(details::e_sf80,details::sf80_op)
|
||||
case_stmt(details::e_sf81,details::sf81_op) case_stmt(details::e_sf82,details::sf82_op)
|
||||
case_stmt(details::e_sf4ext00,details::sfext00_op) case_stmt(details::e_sf4ext01,details::sfext01_op)
|
||||
case_stmt(details::e_sf4ext02,details::sfext02_op) case_stmt(details::e_sf4ext03,details::sfext03_op)
|
||||
case_stmt(details::e_sf4ext04,details::sfext04_op) case_stmt(details::e_sf4ext05,details::sfext05_op)
|
||||
|
@ -10792,9 +10796,9 @@ namespace exprtk
|
|||
}
|
||||
|
||||
// T o (sf3ext)
|
||||
template <typename ExType>
|
||||
template <typename ExternalType>
|
||||
static inline bool compile_right(expression_generator<Type>& expr_gen,
|
||||
ExType t,
|
||||
ExternalType t,
|
||||
const details::operator_type& operation,
|
||||
expression_node_ptr& sf3node,
|
||||
expression_node_ptr& result)
|
||||
|
@ -10808,28 +10812,28 @@ namespace exprtk
|
|||
switch (n->type())
|
||||
{
|
||||
case details::expression_node<Type>::e_covoc : return compile_right_impl
|
||||
<typename covoc_t::sf3_type_node,ExType,ctype,vtype,ctype>(expr_gen,id,t,sf3node,result);
|
||||
<typename covoc_t::sf3_type_node,ExternalType,ctype,vtype,ctype>(expr_gen,id,t,sf3node,result);
|
||||
|
||||
case details::expression_node<Type>::e_covov : return compile_right_impl
|
||||
<typename covov_t::sf3_type_node,ExType,ctype,vtype,vtype>(expr_gen,id,t,sf3node,result);
|
||||
<typename covov_t::sf3_type_node,ExternalType,ctype,vtype,vtype>(expr_gen,id,t,sf3node,result);
|
||||
|
||||
case details::expression_node<Type>::e_vocov : return compile_right_impl
|
||||
<typename vocov_t::sf3_type_node,ExType,vtype,ctype,vtype>(expr_gen,id,t,sf3node,result);
|
||||
<typename vocov_t::sf3_type_node,ExternalType,vtype,ctype,vtype>(expr_gen,id,t,sf3node,result);
|
||||
|
||||
case details::expression_node<Type>::e_vovoc : return compile_right_impl
|
||||
<typename vovoc_t::sf3_type_node,ExType,vtype,vtype,ctype>(expr_gen,id,t,sf3node,result);
|
||||
<typename vovoc_t::sf3_type_node,ExternalType,vtype,vtype,ctype>(expr_gen,id,t,sf3node,result);
|
||||
|
||||
case details::expression_node<Type>::e_vovov : return compile_right_impl
|
||||
<typename vovov_t::sf3_type_node,ExType,vtype,vtype,vtype>(expr_gen,id,t,sf3node,result);
|
||||
<typename vovov_t::sf3_type_node,ExternalType,vtype,vtype,vtype>(expr_gen,id,t,sf3node,result);
|
||||
|
||||
default : return false;
|
||||
}
|
||||
}
|
||||
|
||||
// (sf3ext) o T
|
||||
template <typename ExType>
|
||||
template <typename ExternalType>
|
||||
static inline bool compile_left(expression_generator<Type>& expr_gen,
|
||||
ExType t,
|
||||
ExternalType t,
|
||||
const details::operator_type& operation,
|
||||
expression_node_ptr& sf3node,
|
||||
expression_node_ptr& result)
|
||||
|
@ -10843,28 +10847,28 @@ namespace exprtk
|
|||
switch (n->type())
|
||||
{
|
||||
case details::expression_node<Type>::e_covoc : return compile_left_impl
|
||||
<typename covoc_t::sf3_type_node,ExType,ctype,vtype,ctype>(expr_gen,id,t,sf3node,result);
|
||||
<typename covoc_t::sf3_type_node,ExternalType,ctype,vtype,ctype>(expr_gen,id,t,sf3node,result);
|
||||
|
||||
case details::expression_node<Type>::e_covov : return compile_left_impl
|
||||
<typename covov_t::sf3_type_node,ExType,ctype,vtype,vtype>(expr_gen,id,t,sf3node,result);
|
||||
<typename covov_t::sf3_type_node,ExternalType,ctype,vtype,vtype>(expr_gen,id,t,sf3node,result);
|
||||
|
||||
case details::expression_node<Type>::e_vocov : return compile_left_impl
|
||||
<typename vocov_t::sf3_type_node,ExType,vtype,ctype,vtype>(expr_gen,id,t,sf3node,result);
|
||||
<typename vocov_t::sf3_type_node,ExternalType,vtype,ctype,vtype>(expr_gen,id,t,sf3node,result);
|
||||
|
||||
case details::expression_node<Type>::e_vovoc : return compile_left_impl
|
||||
<typename vovoc_t::sf3_type_node,ExType,vtype,vtype,ctype>(expr_gen,id,t,sf3node,result);
|
||||
<typename vovoc_t::sf3_type_node,ExternalType,vtype,vtype,ctype>(expr_gen,id,t,sf3node,result);
|
||||
|
||||
case details::expression_node<Type>::e_vovov : return compile_left_impl
|
||||
<typename vovov_t::sf3_type_node,ExType,vtype,vtype,vtype>(expr_gen,id,t,sf3node,result);
|
||||
<typename vovov_t::sf3_type_node,ExternalType,vtype,vtype,vtype>(expr_gen,id,t,sf3node,result);
|
||||
|
||||
default : return false;
|
||||
}
|
||||
}
|
||||
|
||||
template <typename SF3TypeNode, typename ExType, typename T0, typename T1, typename T2>
|
||||
template <typename SF3TypeNode, typename ExternalType, typename T0, typename T1, typename T2>
|
||||
static inline bool compile_right_impl(expression_generator<Type>& expr_gen,
|
||||
const std::string& id,
|
||||
ExType t,
|
||||
ExternalType t,
|
||||
expression_node_ptr& node,
|
||||
expression_node_ptr& result)
|
||||
{
|
||||
|
@ -10875,16 +10879,16 @@ namespace exprtk
|
|||
T1 t1 = n->t1();
|
||||
T2 t2 = n->t2();
|
||||
return synthesize_sf4ext_expression::
|
||||
template compile<ExType,T0,T1,T2>(expr_gen,id,t,t0,t1,t2,result);
|
||||
template compile<ExternalType,T0,T1,T2>(expr_gen,id,t,t0,t1,t2,result);
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
template <typename SF3TypeNode, typename ExType, typename T0, typename T1, typename T2>
|
||||
template <typename SF3TypeNode, typename ExternalType, typename T0, typename T1, typename T2>
|
||||
static inline bool compile_left_impl(expression_generator<Type>& expr_gen,
|
||||
const std::string& id,
|
||||
ExType t,
|
||||
ExternalType t,
|
||||
expression_node_ptr& node,
|
||||
expression_node_ptr& result)
|
||||
{
|
||||
|
@ -10895,7 +10899,7 @@ namespace exprtk
|
|||
T1 t1 = n->t1();
|
||||
T2 t2 = n->t2();
|
||||
return synthesize_sf4ext_expression::
|
||||
template compile<T0,T1,T2,ExType>(expr_gen,id,t0,t1,t2,t,result);
|
||||
template compile<T0,T1,T2,ExternalType>(expr_gen,id,t0,t1,t2,t,result);
|
||||
}
|
||||
else
|
||||
return false;
|
||||
|
@ -13703,7 +13707,7 @@ namespace exprtk
|
|||
register_sf3(16) register_sf3(17) register_sf3(18) register_sf3(19)
|
||||
register_sf3(20) register_sf3(21) register_sf3(22) register_sf3(23)
|
||||
register_sf3(24) register_sf3(25) register_sf3(26) register_sf3(27)
|
||||
register_sf3(28)
|
||||
register_sf3(28) register_sf3(29)
|
||||
#undef register_sf3
|
||||
}
|
||||
|
||||
|
@ -13711,15 +13715,15 @@ namespace exprtk
|
|||
{
|
||||
typedef std::pair<quaternary_functor_t,details::operator_type> pair_t;
|
||||
#define register_sf4(Op) sf4_map[details::sf##Op##_op<T>::id()] = pair_t(details::sf##Op##_op<T>::process,details::e_sf##Op);
|
||||
register_sf4(46) register_sf4(47) register_sf4(48) register_sf4(49)
|
||||
register_sf4(50) register_sf4(51) register_sf4(52) register_sf4(53)
|
||||
register_sf4(54) register_sf4(55) register_sf4(56) register_sf4(57)
|
||||
register_sf4(58) register_sf4(59) register_sf4(60) register_sf4(61)
|
||||
register_sf4(62) register_sf4(63) register_sf4(64) register_sf4(65)
|
||||
register_sf4(66) register_sf4(67) register_sf4(68) register_sf4(69)
|
||||
register_sf4(70) register_sf4(71) register_sf4(72) register_sf4(73)
|
||||
register_sf4(74) register_sf4(75) register_sf4(76) register_sf4(77)
|
||||
register_sf4(78) register_sf4(79) register_sf4(80) register_sf4(81)
|
||||
register_sf4(47) register_sf4(48) register_sf4(49) register_sf4(50)
|
||||
register_sf4(51) register_sf4(52) register_sf4(53) register_sf4(54)
|
||||
register_sf4(55) register_sf4(56) register_sf4(57) register_sf4(58)
|
||||
register_sf4(59) register_sf4(60) register_sf4(61) register_sf4(62)
|
||||
register_sf4(63) register_sf4(64) register_sf4(65) register_sf4(66)
|
||||
register_sf4(67) register_sf4(68) register_sf4(69) register_sf4(70)
|
||||
register_sf4(71) register_sf4(72) register_sf4(73) register_sf4(74)
|
||||
register_sf4(75) register_sf4(76) register_sf4(77) register_sf4(78)
|
||||
register_sf4(79) register_sf4(80) register_sf4(81) register_sf4(82)
|
||||
#undef register_sf4
|
||||
|
||||
typedef std::pair<quaternary_functor_t,details::operator_type> pair_t;
|
||||
|
|
546
exprtk_test.cpp
546
exprtk_test.cpp
|
@ -20,6 +20,7 @@
|
|||
#include <cstddef>
|
||||
#include <cstdio>
|
||||
#include <deque>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
@ -645,105 +646,105 @@ static const test_t test_list[] =
|
|||
test_t("sgn( 0)", 0.0),
|
||||
test_t("sgn(+3)",+1.0),
|
||||
test_t("sgn(-3)",-1.0),
|
||||
test_t("equal($f00(1.1,2.2,3.3),((1.1+2.2)/3.3))",1.0),
|
||||
test_t("equal($f01(1.1,2.2,3.3),((1.1+2.2)*3.3))",1.0),
|
||||
test_t("equal($f02(1.1,2.2,3.3),((1.1+2.2)-3.3))",1.0),
|
||||
test_t("equal($f03(1.1,2.2,3.3),((1.1+2.2)+3.3))",1.0),
|
||||
test_t("equal($f04(1.1,2.2,3.3),((1.1-2.2)/3.3))",1.0),
|
||||
test_t("equal($f05(1.1,2.2,3.3),((1.1-2.2)*3.3))",1.0),
|
||||
test_t("equal($f06(1.1,2.2,3.3),((1.1*2.2)+3.3))",1.0),
|
||||
test_t("equal($f07(1.1,2.2,3.3),((1.1*2.2)-3.3))",1.0),
|
||||
test_t("equal($f08(1.1,2.2,3.3),((1.1*2.2)/3.3))",1.0),
|
||||
test_t("equal($f09(1.1,2.2,3.3),((1.1*2.2)*3.3))",1.0),
|
||||
test_t("equal($f10(1.1,2.2,3.3),((1.1/2.2)+3.3))",1.0),
|
||||
test_t("equal($f11(1.1,2.2,3.3),((1.1/2.2)-3.3))",1.0),
|
||||
test_t("equal($f12(1.1,2.2,3.3),((1.1/2.2)/3.3))",1.0),
|
||||
test_t("equal($f13(1.1,2.2,3.3),((1.1/2.2)*3.3))",1.0),
|
||||
test_t("equal($f14(1.1,2.2,3.3),(1.1/(2.2+3.3)))",1.0),
|
||||
test_t("equal($f15(1.1,2.2,3.3),(1.1/(2.2-3.3)))",1.0),
|
||||
test_t("equal($f16(1.1,2.2,3.3),(1.1/(2.2*3.3)))",1.0),
|
||||
test_t("equal($f17(1.1,2.2,3.3),(1.1/(2.2/3.3)))",1.0),
|
||||
test_t("equal($f18(1.1,2.2,3.3),(1.1*(2.2+3.3)))",1.0),
|
||||
test_t("equal($f19(1.1,2.2,3.3),(1.1*(2.2-3.3)))",1.0),
|
||||
test_t("equal($f20(1.1,2.2,3.3),(1.1*(2.2*3.3)))",1.0),
|
||||
test_t("equal($f21(1.1,2.2,3.3),(1.1*(2.2/3.3)))",1.0),
|
||||
test_t("equal($f22(1.1,2.2,3.3),(1.1-(2.2/3.3)))",1.0),
|
||||
test_t("equal($f23(1.1,2.2,3.3),(1.1-(2.2/3.3)))",1.0),
|
||||
test_t("equal($f24(1.1,2.2,3.3),(1.1-(2.2*3.3)))",1.0),
|
||||
test_t("equal($f25(1.1,2.2,3.3),(1.1+(2.2*3.3)))",1.0),
|
||||
test_t("equal($f26(1.1,2.2,3.3),(1.1+(2.2/3.3)))",1.0),
|
||||
test_t("equal($f27(1.1,2.2,3.3),(1.1+(2.2+3.3)))",1.0),
|
||||
test_t("equal($f28(1.1,2.2,3.3),(1.1+(2.2-3.3)))",1.0),
|
||||
test_t("equal($f29(1.1,2.2,3.3),(1.1*2.2^2+3.3))",1.0),
|
||||
test_t("equal($f30(1.1,2.2,3.3),(1.1*2.2^3+3.3))",1.0),
|
||||
test_t("equal($f31(1.1,2.2,3.3),(1.1*2.2^4+3.3))",1.0),
|
||||
test_t("equal($f32(1.1,2.2,3.3),(1.1*2.2^5+3.3))",1.0),
|
||||
test_t("equal($f33(1.1,2.2,3.3),(1.1*2.2^6+3.3))",1.0),
|
||||
test_t("equal($f34(1.1,2.2,3.3),(1.1*2.2^7+3.3))",1.0),
|
||||
test_t("equal($f35(1.1,2.2,3.3),(1.1*2.2^8+3.3))",1.0),
|
||||
test_t("equal($f36(1.1,2.2,3.3),(1.1*2.2^9+3.3))",1.0),
|
||||
test_t("equal($f37(1.1,2.2,3.3),(1.1*log(2.2)+3.3))",1.0),
|
||||
test_t("equal($f38(1.1,2.2,3.3),(1.1*log(2.2)-3.3))",1.0),
|
||||
test_t("equal($f39(1.1,2.2,3.3),(1.1*log10(2.2)+3.3))",1.0),
|
||||
test_t("equal($f40(1.1,2.2,3.3),(1.1*log10(2.2)-3.3))",1.0),
|
||||
test_t("equal($f41(1.1,2.2,3.3),(1.1*sin(2.2)+3.3))",1.0),
|
||||
test_t("equal($f42(1.1,2.2,3.3),(1.1*sin(2.2)-3.3))",1.0),
|
||||
test_t("equal($f43(1.1,2.2,3.3),(1.1*cos(2.2)+3.3))",1.0),
|
||||
test_t("equal($f44(1.1,2.2,3.3),(1.1*cos(2.2)-3.3))",1.0),
|
||||
test_t("equal($f45(1.1,2.2,3.3),if((0 != 1.1),2.2,3.3))",1.0),
|
||||
test_t("equal($f46(1.1,2.2,3.3,4.4),(1.1+((2.2+3.3)/4.4)))",1.0),
|
||||
test_t("equal($f47(1.1,2.2,3.3,4.4),(1.1+((2.2+3.3)*4.4)))",1.0),
|
||||
test_t("equal($f48(1.1,2.2,3.3,4.4),(1.1+((2.2-3.3)/4.4)))",1.0),
|
||||
test_t("equal($f49(1.1,2.2,3.3,4.4),(1.1+((2.2-3.3)*4.4)))",1.0),
|
||||
test_t("equal($f50(1.1,2.2,3.3,4.4),(1.1+((2.2*3.3)/4.4)))",1.0),
|
||||
test_t("equal($f51(1.1,2.2,3.3,4.4),(1.1+((2.2*3.3)*4.4)))",1.0),
|
||||
test_t("equal($f52(1.1,2.2,3.3,4.4),(1.1+((2.2/3.3)+4.4)))",1.0),
|
||||
test_t("equal($f53(1.1,2.2,3.3,4.4),(1.1+((2.2/3.3)/4.4)))",1.0),
|
||||
test_t("equal($f54(1.1,2.2,3.3,4.4),(1.1+((2.2/3.3)*4.4)))",1.0),
|
||||
test_t("equal($f55(1.1,2.2,3.3,4.4),(1.1-((2.2+3.3)/4.4)))",1.0),
|
||||
test_t("equal($f56(1.1,2.2,3.3,4.4),(1.1-((2.2+3.3)*4.4)))",1.0),
|
||||
test_t("equal($f57(1.1,2.2,3.3,4.4),(1.1-((2.2-3.3)/4.4)))",1.0),
|
||||
test_t("equal($f58(1.1,2.2,3.3,4.4),(1.1-((2.2-3.3)*4.4)))",1.0),
|
||||
test_t("equal($f59(1.1,2.2,3.3,4.4),(1.1-((2.2*3.3)/4.4)))",1.0),
|
||||
test_t("equal($f60(1.1,2.2,3.3,4.4),(1.1-((2.2*3.3)*4.4)))",1.0),
|
||||
test_t("equal($f61(1.1,2.2,3.3,4.4),(1.1-((2.2/3.3)/4.4)))",1.0),
|
||||
test_t("equal($f62(1.1,2.2,3.3,4.4),(1.1-((2.2/3.3)*4.4)))",1.0),
|
||||
test_t("equal($f63(1.1,2.2,3.3,4.4),(((1.1+2.2)*3.3)-4.4))",1.0),
|
||||
test_t("equal($f64(1.1,2.2,3.3,4.4),(((1.1-2.2)*3.3)-4.4))",1.0),
|
||||
test_t("equal($f65(1.1,2.2,3.3,4.4),(((1.1*2.2)*3.3)-4.4))",1.0),
|
||||
test_t("equal($f66(1.1,2.2,3.3,4.4),(((1.1/2.2)*3.3)-4.4))",1.0),
|
||||
test_t("equal($f67(1.1,2.2,3.3,4.4),(((1.1+2.2)/3.3)-4.4))",1.0),
|
||||
test_t("equal($f68(1.1,2.2,3.3,4.4),(((1.1-2.2)/3.3)-4.4))",1.0),
|
||||
test_t("equal($f69(1.1,2.2,3.3,4.4),(((1.1*2.2)/3.3)-4.4))",1.0),
|
||||
test_t("equal($f70(1.1,2.2,3.3,4.4),(((1.1/2.2)/3.3)-4.4))",1.0),
|
||||
test_t("equal($f71(1.1,2.2,3.3,4.4),(1.1*2.2)+(3.3*4.4))",1.0),
|
||||
test_t("equal($f72(1.1,2.2,3.3,4.4),(1.1*2.2)-(3.3*4.4))",1.0),
|
||||
test_t("equal($f73(1.1,2.2,3.3,4.4),(1.1*2.2)+(3.3/4.4))",1.0),
|
||||
test_t("equal($f74(1.1,2.2,3.3,4.4),(1.1*2.2)-(3.3/4.4))",1.0),
|
||||
test_t("equal($f75(1.1,2.2,3.3,4.4),(1.1/2.2)+(3.3/4.4))",1.0),
|
||||
test_t("equal($f76(1.1,2.2,3.3,4.4),(1.1/2.2)-(3.3/4.4))",1.0),
|
||||
test_t("equal($f77(1.1,2.2,3.3,4.4),(1.1/2.2)-(3.3*4.4))",1.0),
|
||||
test_t("equal($f78(1.1,2.2,3.3,4.4),(1.1/(2.2+(3.3*4.4))))",1.0),
|
||||
test_t("equal($f79(1.1,2.2,3.3,4.4),(1.1/(2.2-(3.3*4.4))))",1.0),
|
||||
test_t("equal($f80(1.1,2.2,3.3,4.4),(1.1*(2.2+(3.3*4.4))))",1.0),
|
||||
test_t("equal($f81(1.1,2.2,3.3,4.4),(1.1*(2.2-(3.3*4.4))))",1.0),
|
||||
test_t("equal($f82(1.1,2.2,3.3,4.4),(1.1*2.2^2+3.3*4.4^2))",1.0),
|
||||
test_t("equal($f83(1.1,2.2,3.3,4.4),(1.1*2.2^3+3.3*4.4^3))",1.0),
|
||||
test_t("equal($f84(1.1,2.2,3.3,4.4),(1.1*2.2^4+3.3*4.4^4))",1.0),
|
||||
test_t("equal($f85(1.1,2.2,3.3,4.4),(1.1*2.2^5+3.3*4.4^5))",1.0),
|
||||
test_t("equal($f86(1.1,2.2,3.3,4.4),(1.1*2.2^6+3.3*4.4^6))",1.0),
|
||||
test_t("equal($f87(1.1,2.2,3.3,4.4),(1.1*2.2^7+3.3*4.4^7))",1.0),
|
||||
test_t("equal($f88(1.1,2.2,3.3,4.4),(1.1*2.2^8+3.3*4.4^8))",1.0),
|
||||
test_t("equal($f89(1.1,2.2,3.3,4.4),(1.1*2.2^9+3.3*4.4^9))",1.0),
|
||||
test_t("equal($f90(1.1,2.2,3.3,4.4),if(1.1 and 2.2,3.3,4.4))",1.0),
|
||||
test_t("equal($f91(1.1,2.2,3.3,4.4),if(1.1 or 2.2,3.3,4.4))",1.0),
|
||||
test_t("equal($f92(1.1,2.2,3.3,4.4),if(1.1 < 2.2,3.3,4.4))",1.0),
|
||||
test_t("equal($f93(1.1,2.2,3.3,4.4),if(1.1 <= 2.2,3.3,4.4))",1.0),
|
||||
test_t("equal($f94(1.1,2.2,3.3,4.4),if(1.1 > 2.2,3.3,4.4))",1.0),
|
||||
test_t("equal($f95(1.1,2.2,3.3,4.4),if(1.1 >= 2.2,3.3,4.4))",1.0),
|
||||
test_t("equal($f96(1.1,2.2,3.3,4.4),if(equal(1.1,2.2),3.3,4.4))",1.0),
|
||||
test_t("equal($f97(1.1,2.2,3.3,4.4),1.1*sin(2.2)+3.3*cos(4.4))",1.0),
|
||||
test_t("equal($f97(1.1,2.2,3.3,4.4),1.1*sin(2.2)+3.3*cos(4.4))",1.0),
|
||||
test_t("equal($f00(1.1,2.2,3.3),(1.1+2.2)/3.3)",1.0),
|
||||
test_t("equal($f01(1.1,2.2,3.3),(1.1+2.2)*3.3)",1.0),
|
||||
test_t("equal($f02(1.1,2.2,3.3),(1.1+2.2)-3.3)",1.0),
|
||||
test_t("equal($f03(1.1,2.2,3.3),(1.1+2.2)+3.3)",1.0),
|
||||
test_t("equal($f04(1.1,2.2,3.3),(1.1-2.2)/3.3)",1.0),
|
||||
test_t("equal($f05(1.1,2.2,3.3),(1.1-2.2)*3.3)",1.0),
|
||||
test_t("equal($f06(1.1,2.2,3.3),(1.1*2.2)+3.3)",1.0),
|
||||
test_t("equal($f07(1.1,2.2,3.3),(1.1*2.2)-3.3)",1.0),
|
||||
test_t("equal($f08(1.1,2.2,3.3),(1.1*2.2)/3.3)",1.0),
|
||||
test_t("equal($f09(1.1,2.2,3.3),(1.1*2.2)*3.3)",1.0),
|
||||
test_t("equal($f10(1.1,2.2,3.3),(1.1/2.2)+3.3)",1.0),
|
||||
test_t("equal($f11(1.1,2.2,3.3),(1.1/2.2)-3.3)",1.0),
|
||||
test_t("equal($f12(1.1,2.2,3.3),(1.1/2.2)/3.3)",1.0),
|
||||
test_t("equal($f13(1.1,2.2,3.3),(1.1/2.2)*3.3)",1.0),
|
||||
test_t("equal($f14(1.1,2.2,3.3),1.1/(2.2+3.3))",1.0),
|
||||
test_t("equal($f15(1.1,2.2,3.3),1.1/(2.2-3.3))",1.0),
|
||||
test_t("equal($f16(1.1,2.2,3.3),1.1/(2.2*3.3))",1.0),
|
||||
test_t("equal($f17(1.1,2.2,3.3),1.1/(2.2/3.3))",1.0),
|
||||
test_t("equal($f18(1.1,2.2,3.3),1.1*(2.2+3.3))",1.0),
|
||||
test_t("equal($f19(1.1,2.2,3.3),1.1*(2.2-3.3))",1.0),
|
||||
test_t("equal($f20(1.1,2.2,3.3),1.1*(2.2*3.3))",1.0),
|
||||
test_t("equal($f21(1.1,2.2,3.3),1.1*(2.2/3.3))",1.0),
|
||||
test_t("equal($f22(1.1,2.2,3.3),1.1-(2.2+3.3))",1.0),
|
||||
test_t("equal($f23(1.1,2.2,3.3),1.1-(2.2-3.3))",1.0),
|
||||
test_t("equal($f24(1.1,2.2,3.3),1.1-(2.2/3.3))",1.0),
|
||||
test_t("equal($f25(1.1,2.2,3.3),1.1-(2.2*3.3))",1.0),
|
||||
test_t("equal($f26(1.1,2.2,3.3),1.1+(2.2*3.3))",1.0),
|
||||
test_t("equal($f27(1.1,2.2,3.3),1.1+(2.2/3.3))",1.0),
|
||||
test_t("equal($f28(1.1,2.2,3.3),1.1+(2.2+3.3))",1.0),
|
||||
test_t("equal($f29(1.1,2.2,3.3),1.1+(2.2-3.3))",1.0),
|
||||
test_t("equal($f30(1.1,2.2,3.3),1.1*2.2^2+3.3)",1.0),
|
||||
test_t("equal($f31(1.1,2.2,3.3),1.1*2.2^3+3.3)",1.0),
|
||||
test_t("equal($f32(1.1,2.2,3.3),1.1*2.2^4+3.3)",1.0),
|
||||
test_t("equal($f33(1.1,2.2,3.3),1.1*2.2^5+3.3)",1.0),
|
||||
test_t("equal($f34(1.1,2.2,3.3),1.1*2.2^6+3.3)",1.0),
|
||||
test_t("equal($f35(1.1,2.2,3.3),1.1*2.2^7+3.3)",1.0),
|
||||
test_t("equal($f36(1.1,2.2,3.3),1.1*2.2^8+3.3)",1.0),
|
||||
test_t("equal($f37(1.1,2.2,3.3),1.1*2.2^9+3.3)",1.0),
|
||||
test_t("equal($f38(1.1,2.2,3.3),1.1*log(2.2)+3.3)",1.0),
|
||||
test_t("equal($f39(1.1,2.2,3.3),1.1*log(2.2)-3.3)",1.0),
|
||||
test_t("equal($f40(1.1,2.2,3.3),1.1*log10(2.2)+3.3)",1.0),
|
||||
test_t("equal($f41(1.1,2.2,3.3),1.1*log10(2.2)-3.3)",1.0),
|
||||
test_t("equal($f42(1.1,2.2,3.3),1.1*sin(2.2)+3.3)",1.0),
|
||||
test_t("equal($f43(1.1,2.2,3.3),1.1*sin(2.2)-3.3)",1.0),
|
||||
test_t("equal($f44(1.1,2.2,3.3),1.1*cos(2.2)+3.3)",1.0),
|
||||
test_t("equal($f45(1.1,2.2,3.3),1.1*cos(2.2)-3.3)",1.0),
|
||||
test_t("equal($f46(1.1,2.2,3.3),if(0!=1.1,2.2,3.3))",1.0),
|
||||
test_t("equal($f47(1.1,2.2,3.3,4.4),1.1+((2.2+3.3)/4.4))",1.0),
|
||||
test_t("equal($f48(1.1,2.2,3.3,4.4),1.1+((2.2+3.3)*4.4))",1.0),
|
||||
test_t("equal($f49(1.1,2.2,3.3,4.4),1.1+((2.2-3.3)/4.4))",1.0),
|
||||
test_t("equal($f50(1.1,2.2,3.3,4.4),1.1+((2.2-3.3)*4.4))",1.0),
|
||||
test_t("equal($f51(1.1,2.2,3.3,4.4),1.1+((2.2*3.3)/4.4))",1.0),
|
||||
test_t("equal($f52(1.1,2.2,3.3,4.4),1.1+((2.2*3.3)*4.4))",1.0),
|
||||
test_t("equal($f53(1.1,2.2,3.3,4.4),1.1+((2.2/3.3)+4.4))",1.0),
|
||||
test_t("equal($f54(1.1,2.2,3.3,4.4),1.1+((2.2/3.3)/4.4))",1.0),
|
||||
test_t("equal($f55(1.1,2.2,3.3,4.4),1.1+((2.2/3.3)*4.4))",1.0),
|
||||
test_t("equal($f56(1.1,2.2,3.3,4.4),1.1-((2.2+3.3)/4.4))",1.0),
|
||||
test_t("equal($f57(1.1,2.2,3.3,4.4),1.1-((2.2+3.3)*4.4))",1.0),
|
||||
test_t("equal($f58(1.1,2.2,3.3,4.4),1.1-((2.2-3.3)/4.4))",1.0),
|
||||
test_t("equal($f59(1.1,2.2,3.3,4.4),1.1-((2.2-3.3)*4.4))",1.0),
|
||||
test_t("equal($f60(1.1,2.2,3.3,4.4),1.1-((2.2*3.3)/4.4))",1.0),
|
||||
test_t("equal($f61(1.1,2.2,3.3,4.4),1.1-((2.2*3.3)*4.4))",1.0),
|
||||
test_t("equal($f62(1.1,2.2,3.3,4.4),1.1-((2.2/3.3)/4.4))",1.0),
|
||||
test_t("equal($f63(1.1,2.2,3.3,4.4),1.1-((2.2/3.3)*4.4))",1.0),
|
||||
test_t("equal($f64(1.1,2.2,3.3,4.4),((1.1+2.2)*3.3)-4.4)",1.0),
|
||||
test_t("equal($f65(1.1,2.2,3.3,4.4),((1.1-2.2)*3.3)-4.4)",1.0),
|
||||
test_t("equal($f66(1.1,2.2,3.3,4.4),((1.1*2.2)*3.3)-4.4)",1.0),
|
||||
test_t("equal($f67(1.1,2.2,3.3,4.4),((1.1/2.2)*3.3)-4.4)",1.0),
|
||||
test_t("equal($f68(1.1,2.2,3.3,4.4),((1.1+2.2)/3.3)-4.4)",1.0),
|
||||
test_t("equal($f69(1.1,2.2,3.3,4.4),((1.1-2.2)/3.3)-4.4)",1.0),
|
||||
test_t("equal($f70(1.1,2.2,3.3,4.4),((1.1*2.2)/3.3)-4.4)",1.0),
|
||||
test_t("equal($f71(1.1,2.2,3.3,4.4),((1.1/2.2)/3.3)-4.4)",1.0),
|
||||
test_t("equal($f72(1.1,2.2,3.3,4.4),(1.1*2.2)+(3.3*4.4))",1.0),
|
||||
test_t("equal($f73(1.1,2.2,3.3,4.4),(1.1*2.2)-(3.3*4.4))",1.0),
|
||||
test_t("equal($f74(1.1,2.2,3.3,4.4),(1.1*2.2)+(3.3/4.4))",1.0),
|
||||
test_t("equal($f75(1.1,2.2,3.3,4.4),(1.1*2.2)-(3.3/4.4))",1.0),
|
||||
test_t("equal($f76(1.1,2.2,3.3,4.4),(1.1/2.2)+(3.3/4.4))",1.0),
|
||||
test_t("equal($f77(1.1,2.2,3.3,4.4),(1.1/2.2)-(3.3/4.4))",1.0),
|
||||
test_t("equal($f78(1.1,2.2,3.3,4.4),(1.1/2.2)-(3.3*4.4))",1.0),
|
||||
test_t("equal($f79(1.1,2.2,3.3,4.4),1.1/(2.2+(3.3*4.4)))",1.0),
|
||||
test_t("equal($f80(1.1,2.2,3.3,4.4),1.1/(2.2-(3.3*4.4)))",1.0),
|
||||
test_t("equal($f81(1.1,2.2,3.3,4.4),1.1*(2.2+(3.3*4.4)))",1.0),
|
||||
test_t("equal($f82(1.1,2.2,3.3,4.4),1.1*(2.2-(3.3*4.4)))",1.0),
|
||||
test_t("equal($f83(1.1,2.2,3.3,4.4),1.1*2.2^2+3.3*4.4^2)",1.0),
|
||||
test_t("equal($f84(1.1,2.2,3.3,4.4),1.1*2.2^3+3.3*4.4^3)",1.0),
|
||||
test_t("equal($f85(1.1,2.2,3.3,4.4),1.1*2.2^4+3.3*4.4^4)",1.0),
|
||||
test_t("equal($f86(1.1,2.2,3.3,4.4),1.1*2.2^5+3.3*4.4^5)",1.0),
|
||||
test_t("equal($f87(1.1,2.2,3.3,4.4),1.1*2.2^6+3.3*4.4^6)",1.0),
|
||||
test_t("equal($f88(1.1,2.2,3.3,4.4),1.1*2.2^7+3.3*4.4^7)",1.0),
|
||||
test_t("equal($f89(1.1,2.2,3.3,4.4),1.1*2.2^8+3.3*4.4^8)",1.0),
|
||||
test_t("equal($f90(1.1,2.2,3.3,4.4),1.1*2.2^9+3.3*4.4^9)",1.0),
|
||||
test_t("equal($f91(1.1,2.2,3.3,4.4),if(1.1 and 2.2,3.3,4.4))",1.0),
|
||||
test_t("equal($f92(1.1,2.2,3.3,4.4),if(1.1 or 2.2,3.3,4.4))",1.0),
|
||||
test_t("equal($f93(1.1,2.2,3.3,4.4),if(1.1 < 2.2,3.3,4.4))",1.0),
|
||||
test_t("equal($f94(1.1,2.2,3.3,4.4),if(1.1 <= 2.2,3.3,4.4))",1.0),
|
||||
test_t("equal($f95(1.1,2.2,3.3,4.4),if(1.1 > 2.2,3.3,4.4))",1.0),
|
||||
test_t("equal($f96(1.1,2.2,3.3,4.4),if(1.1 >= 2.2,3.3,4.4))",1.0),
|
||||
test_t("equal($f97(1.1,2.2,3.3,4.4),if(equal(1.1,2.2),3.3,4.4))",1.0),
|
||||
test_t("equal($f98(1.1,2.2,3.3,4.4),1.1*sin(2.2)+3.3*cos(4.4))",1.0),
|
||||
test_t("equal((48.0/2.0*(9.0+3.0)),288.0)",1.0),
|
||||
test_t("equal((48.0/2.0(9.0+3.0)),288.0)",1.0),
|
||||
test_t("equal((6.0/2.0(1.0+2.0)),9.0)",1.0),
|
||||
|
@ -1554,104 +1555,105 @@ inline bool run_test08()
|
|||
"(sin(x)y)==(sin(x)*y)",
|
||||
"(sin(x)cos(y)+1)==(sin(x)*cos(y)+1)",
|
||||
"(sgn(sin(x))cos(sgn(y))+1)==(sgn(sin(x))*cos(sgn(y))+1)",
|
||||
"equal($f00(x,y,z),((x+y)/z))",
|
||||
"equal($f01(x,y,z),((x+y)*z))",
|
||||
"equal($f02(x,y,z),((x+y)-z))",
|
||||
"equal($f03(x,y,z),((x+y)+z))",
|
||||
"equal($f04(x,y,z),((x-y)/z))",
|
||||
"equal($f05(x,y,z),((x-y)*z))",
|
||||
"equal($f06(x,y,z),((x*y)+z))",
|
||||
"equal($f07(x,y,z),((x*y)-z))",
|
||||
"equal($f08(x,y,z),((x*y)/z))",
|
||||
"equal($f09(x,y,z),((x*y)*z))",
|
||||
"equal($f10(x,y,z),((x/y)+z))",
|
||||
"equal($f11(x,y,z),((x/y)-z))",
|
||||
"equal($f12(x,y,z),((x/y)/z))",
|
||||
"equal($f13(x,y,z),((x/y)*z))",
|
||||
"equal($f14(x,y,z),(x/(y+z)))",
|
||||
"equal($f15(x,y,z),(x/(y-z)))",
|
||||
"equal($f16(x,y,z),(x/(y*z)))",
|
||||
"equal($f17(x,y,z),(x/(y/z)))",
|
||||
"equal($f18(x,y,z),(x*(y+z)))",
|
||||
"equal($f19(x,y,z),(x*(y-z)))",
|
||||
"equal($f20(x,y,z),(x*(y*z)))",
|
||||
"equal($f21(x,y,z),(x*(y/z)))",
|
||||
"equal($f22(x,y,z),(x-(y/z)))",
|
||||
"equal($f23(x,y,z),(x-(y/z)))",
|
||||
"equal($f24(x,y,z),(x-(y*z)))",
|
||||
"equal($f25(x,y,z),(x+(y*z)))",
|
||||
"equal($f26(x,y,z),(x+(y/z)))",
|
||||
"equal($f27(x,y,z),(x+(y+z)))",
|
||||
"equal($f28(x,y,z),(x+(y-z)))",
|
||||
"equal($f29(x,y,z),(x*y^2+z))",
|
||||
"equal($f30(x,y,z),(x*y^3+z))",
|
||||
"equal($f31(x,y,z),(x*y^4+z))",
|
||||
"equal($f32(x,y,z),(x*y^5+z))",
|
||||
"equal($f33(x,y,z),(x*y^6+z))",
|
||||
"equal($f34(x,y,z),(x*y^7+z))",
|
||||
"equal($f35(x,y,z),(x*y^8+z))",
|
||||
"equal($f36(x,y,z),(x*y^9+z))",
|
||||
"equal($f37(x,y,z),(x*log(y)+z))",
|
||||
"equal($f38(x,y,z),(x*log(y)-z))",
|
||||
"equal($f39(x,y,z),(x*log10(y)+z))",
|
||||
"equal($f40(x,y,z),(x*log10(y)-z))",
|
||||
"equal($f41(x,y,z),(x*sin(y)+z))",
|
||||
"equal($f42(x,y,z),(x*sin(y)-z))",
|
||||
"equal($f43(x,y,z),(x*cos(y)+z))",
|
||||
"equal($f44(x,y,z),(x*cos(y)-z))",
|
||||
"equal($f45(x,y,z),if((0 != x),y,z))",
|
||||
"equal($f46(x,y,z,w),(x+((y+z)/w)))",
|
||||
"equal($f47(x,y,z,w),(x+((y+z)*w)))",
|
||||
"equal($f48(x,y,z,w),(x+((y-z)/w)))",
|
||||
"equal($f49(x,y,z,w),(x+((y-z)*w)))",
|
||||
"equal($f50(x,y,z,w),(x+((y*z)/w)))",
|
||||
"equal($f51(x,y,z,w),(x+((y*z)*w)))",
|
||||
"equal($f52(x,y,z,w),(x+((y/z)+w)))",
|
||||
"equal($f53(x,y,z,w),(x+((y/z)/w)))",
|
||||
"equal($f54(x,y,z,w),(x+((y/z)*w)))",
|
||||
"equal($f55(x,y,z,w),(x-((y+z)/w)))",
|
||||
"equal($f56(x,y,z,w),(x-((y+z)*w)))",
|
||||
"equal($f57(x,y,z,w),(x-((y-z)/w)))",
|
||||
"equal($f58(x,y,z,w),(x-((y-z)*w)))",
|
||||
"equal($f59(x,y,z,w),(x-((y*z)/w)))",
|
||||
"equal($f60(x,y,z,w),(x-((y*z)*w)))",
|
||||
"equal($f61(x,y,z,w),(x-((y/z)/w)))",
|
||||
"equal($f62(x,y,z,w),(x-((y/z)*w)))",
|
||||
"equal($f63(x,y,z,w),(((x+y)*z)-w))",
|
||||
"equal($f64(x,y,z,w),(((x-y)*z)-w))",
|
||||
"equal($f65(x,y,z,w),(((x*y)*z)-w))",
|
||||
"equal($f66(x,y,z,w),(((x/y)*z)-w))",
|
||||
"equal($f67(x,y,z,w),(((x+y)/z)-w))",
|
||||
"equal($f68(x,y,z,w),(((x-y)/z)-w))",
|
||||
"equal($f69(x,y,z,w),(((x*y)/z)-w))",
|
||||
"equal($f70(x,y,z,w),(((x/y)/z)-w))",
|
||||
"equal($f71(x,y,z,w),(x*y)+(z*w))",
|
||||
"equal($f72(x,y,z,w),(x*y)-(z*w))",
|
||||
"equal($f73(x,y,z,w),(x*y)+(z/w))",
|
||||
"equal($f74(x,y,z,w),(x*y)-(z/w))",
|
||||
"equal($f75(x,y,z,w),(x/y)+(z/w))",
|
||||
"equal($f76(x,y,z,w),(x/y)-(z/w))",
|
||||
"equal($f77(x,y,z,w),(x/y)-(z*w))",
|
||||
"equal($f78(x,y,z,w),(x/(y+(z*w))))",
|
||||
"equal($f79(x,y,z,w),(x/(y-(z*w))))",
|
||||
"equal($f80(x,y,z,w),(x*(y+(z*w))))",
|
||||
"equal($f81(x,y,z,w),(x*(y-(z*w))))",
|
||||
"equal($f82(x,y,z,w),(x*y^2+z*w^2))",
|
||||
"equal($f83(x,y,z,w),(x*y^3+z*w^3))",
|
||||
"equal($f84(x,y,z,w),(x*y^4+z*w^4))",
|
||||
"equal($f85(x,y,z,w),(x*y^5+z*w^5))",
|
||||
"equal($f86(x,y,z,w),(x*y^6+z*w^6))",
|
||||
"equal($f87(x,y,z,w),(x*y^7+z*w^7))",
|
||||
"equal($f88(x,y,z,w),(x*y^8+z*w^8))",
|
||||
"equal($f89(x,y,z,w),(x*y^9+z*w^9))",
|
||||
"equal($f90(x,y,z,w),if(x and y,z,w))",
|
||||
"equal($f91(x,y,z,w),if(x or y,z,w))",
|
||||
"equal($f92(x,y,z,w),if(x < y,z,w))",
|
||||
"equal($f93(x,y,z,w),if(x <= y,z,w))",
|
||||
"equal($f94(x,y,z,w),if(x > y,z,w))",
|
||||
"equal($f95(x,y,z,w),if(x >= y,z,w))",
|
||||
"equal($f96(x,y,z,w),if(equal(x,y),z,w))",
|
||||
"equal($f97(x,y,z,w),x*sin(y)+z*cos(w))"
|
||||
"equal($f00(x,y,z),(x+y)/z)",
|
||||
"equal($f01(x,y,z),(x+y)*z)",
|
||||
"equal($f02(x,y,z),(x+y)-z)",
|
||||
"equal($f03(x,y,z),(x+y)+z)",
|
||||
"equal($f04(x,y,z),(x-y)/z)",
|
||||
"equal($f05(x,y,z),(x-y)*z)",
|
||||
"equal($f06(x,y,z),(x*y)+z)",
|
||||
"equal($f07(x,y,z),(x*y)-z)",
|
||||
"equal($f08(x,y,z),(x*y)/z)",
|
||||
"equal($f09(x,y,z),(x*y)*z)",
|
||||
"equal($f10(x,y,z),(x/y)+z)",
|
||||
"equal($f11(x,y,z),(x/y)-z)",
|
||||
"equal($f12(x,y,z),(x/y)/z)",
|
||||
"equal($f13(x,y,z),(x/y)*z)",
|
||||
"equal($f14(x,y,z),x/(y+z))",
|
||||
"equal($f15(x,y,z),x/(y-z))",
|
||||
"equal($f16(x,y,z),x/(y*z))",
|
||||
"equal($f17(x,y,z),x/(y/z))",
|
||||
"equal($f18(x,y,z),x*(y+z))",
|
||||
"equal($f19(x,y,z),x*(y-z))",
|
||||
"equal($f20(x,y,z),x*(y*z))",
|
||||
"equal($f21(x,y,z),x*(y/z))",
|
||||
"equal($f22(x,y,z),x-(y+z))",
|
||||
"equal($f23(x,y,z),x-(y-z))",
|
||||
"equal($f24(x,y,z),x-(y/z))",
|
||||
"equal($f25(x,y,z),x-(y*z))",
|
||||
"equal($f26(x,y,z),x+(y*z))",
|
||||
"equal($f27(x,y,z),x+(y/z))",
|
||||
"equal($f28(x,y,z),x+(y+z))",
|
||||
"equal($f29(x,y,z),x+(y-z))",
|
||||
"equal($f30(x,y,z),x*y^2+z)",
|
||||
"equal($f31(x,y,z),x*y^3+z)",
|
||||
"equal($f32(x,y,z),x*y^4+z)",
|
||||
"equal($f33(x,y,z),x*y^5+z)",
|
||||
"equal($f34(x,y,z),x*y^6+z)",
|
||||
"equal($f35(x,y,z),x*y^7+z)",
|
||||
"equal($f36(x,y,z),x*y^8+z)",
|
||||
"equal($f37(x,y,z),x*y^9+z)",
|
||||
"equal($f38(x,y,z),x*log(y)+z)",
|
||||
"equal($f39(x,y,z),x*log(y)-z)",
|
||||
"equal($f40(x,y,z),x*log10(y)+z)",
|
||||
"equal($f41(x,y,z),x*log10(y)-z)",
|
||||
"equal($f42(x,y,z),x*sin(y)+z)",
|
||||
"equal($f43(x,y,z),x*sin(y)-z)",
|
||||
"equal($f44(x,y,z),x*cos(y)+z)",
|
||||
"equal($f45(x,y,z),x*cos(y)-z)",
|
||||
"equal($f46(x,y,z),if(0!=x,y,z))",
|
||||
"equal($f47(x,y,z,w),x+((y+z)/w))",
|
||||
"equal($f48(x,y,z,w),x+((y+z)*w))",
|
||||
"equal($f49(x,y,z,w),x+((y-z)/w))",
|
||||
"equal($f50(x,y,z,w),x+((y-z)*w))",
|
||||
"equal($f51(x,y,z,w),x+((y*z)/w))",
|
||||
"equal($f52(x,y,z,w),x+((y*z)*w))",
|
||||
"equal($f53(x,y,z,w),x+((y/z)+w))",
|
||||
"equal($f54(x,y,z,w),x+((y/z)/w))",
|
||||
"equal($f55(x,y,z,w),x+((y/z)*w))",
|
||||
"equal($f56(x,y,z,w),x-((y+z)/w))",
|
||||
"equal($f57(x,y,z,w),x-((y+z)*w))",
|
||||
"equal($f58(x,y,z,w),x-((y-z)/w))",
|
||||
"equal($f59(x,y,z,w),x-((y-z)*w))",
|
||||
"equal($f60(x,y,z,w),x-((y*z)/w))",
|
||||
"equal($f61(x,y,z,w),x-((y*z)*w))",
|
||||
"equal($f62(x,y,z,w),x-((y/z)/w))",
|
||||
"equal($f63(x,y,z,w),x-((y/z)*w))",
|
||||
"equal($f64(x,y,z,w),((x+y)*z)-w)",
|
||||
"equal($f65(x,y,z,w),((x-y)*z)-w)",
|
||||
"equal($f66(x,y,z,w),((x*y)*z)-w)",
|
||||
"equal($f67(x,y,z,w),((x/y)*z)-w)",
|
||||
"equal($f68(x,y,z,w),((x+y)/z)-w)",
|
||||
"equal($f69(x,y,z,w),((x-y)/z)-w)",
|
||||
"equal($f70(x,y,z,w),((x*y)/z)-w)",
|
||||
"equal($f71(x,y,z,w),((x/y)/z)-w)",
|
||||
"equal($f72(x,y,z,w),(x*y)+(z*w))",
|
||||
"equal($f73(x,y,z,w),(x*y)-(z*w))",
|
||||
"equal($f74(x,y,z,w),(x*y)+(z/w))",
|
||||
"equal($f75(x,y,z,w),(x*y)-(z/w))",
|
||||
"equal($f76(x,y,z,w),(x/y)+(z/w))",
|
||||
"equal($f77(x,y,z,w),(x/y)-(z/w))",
|
||||
"equal($f78(x,y,z,w),(x/y)-(z*w))",
|
||||
"equal($f79(x,y,z,w),x/(y+(z*w)))",
|
||||
"equal($f80(x,y,z,w),x/(y-(z*w)))",
|
||||
"equal($f81(x,y,z,w),x*(y+(z*w)))",
|
||||
"equal($f82(x,y,z,w),x*(y-(z*w)))",
|
||||
"equal($f83(x,y,z,w),x*y^2+z*w^2)",
|
||||
"equal($f84(x,y,z,w),x*y^3+z*w^3)",
|
||||
"equal($f85(x,y,z,w),x*y^4+z*w^4)",
|
||||
"equal($f86(x,y,z,w),x*y^5+z*w^5)",
|
||||
"equal($f87(x,y,z,w),x*y^6+z*w^6)",
|
||||
"equal($f88(x,y,z,w),x*y^7+z*w^7)",
|
||||
"equal($f89(x,y,z,w),x*y^8+z*w^8)",
|
||||
"equal($f90(x,y,z,w),x*y^9+z*w^9)",
|
||||
"equal($f91(x,y,z,w),if(x and y,z,w))",
|
||||
"equal($f92(x,y,z,w),if(x or y,z,w))",
|
||||
"equal($f93(x,y,z,w),if(x < y,z,w))",
|
||||
"equal($f94(x,y,z,w),if(x <= y,z,w))",
|
||||
"equal($f95(x,y,z,w),if(x > y,z,w))",
|
||||
"equal($f96(x,y,z,w),if(x >= y,z,w))",
|
||||
"equal($f97(x,y,z,w),if(equal(x,y),z,w))",
|
||||
"equal($f98(x,y,z,w),x*sin(y)+z*cos(w))"
|
||||
};
|
||||
static const std::size_t expr_str_size = sizeof(expr_str) / sizeof(std::string);
|
||||
|
||||
|
@ -2344,30 +2346,30 @@ inline bool run_test12()
|
|||
|
||||
T x = T(1.23456);
|
||||
|
||||
exprtk::polynomial<T, 1> poly1;
|
||||
exprtk::polynomial<T, 2> poly2;
|
||||
exprtk::polynomial<T, 3> poly3;
|
||||
exprtk::polynomial<T, 4> poly4;
|
||||
exprtk::polynomial<T, 5> poly5;
|
||||
exprtk::polynomial<T, 6> poly6;
|
||||
exprtk::polynomial<T, 7> poly7;
|
||||
exprtk::polynomial<T, 8> poly8;
|
||||
exprtk::polynomial<T, 9> poly9;
|
||||
exprtk::polynomial<T, 1> poly01;
|
||||
exprtk::polynomial<T, 2> poly02;
|
||||
exprtk::polynomial<T, 3> poly03;
|
||||
exprtk::polynomial<T, 4> poly04;
|
||||
exprtk::polynomial<T, 5> poly05;
|
||||
exprtk::polynomial<T, 6> poly06;
|
||||
exprtk::polynomial<T, 7> poly07;
|
||||
exprtk::polynomial<T, 8> poly08;
|
||||
exprtk::polynomial<T, 9> poly09;
|
||||
exprtk::polynomial<T,10> poly10;
|
||||
|
||||
exprtk::symbol_table<T> symbol_table;
|
||||
|
||||
symbol_table.add_variable("x",x);
|
||||
symbol_table.add_function( "poly1", poly1);
|
||||
symbol_table.add_function( "poly2", poly2);
|
||||
symbol_table.add_function( "poly3", poly3);
|
||||
symbol_table.add_function( "poly4", poly4);
|
||||
symbol_table.add_function( "poly5", poly5);
|
||||
symbol_table.add_function( "poly6", poly6);
|
||||
symbol_table.add_function( "poly7", poly7);
|
||||
symbol_table.add_function( "poly8", poly8);
|
||||
symbol_table.add_function( "poly9", poly9);
|
||||
symbol_table.add_function("poly10",poly10);
|
||||
symbol_table.add_function( "poly1", poly01);
|
||||
symbol_table.add_function( "poly2", poly02);
|
||||
symbol_table.add_function( "poly3", poly03);
|
||||
symbol_table.add_function( "poly4", poly04);
|
||||
symbol_table.add_function( "poly5", poly05);
|
||||
symbol_table.add_function( "poly6", poly06);
|
||||
symbol_table.add_function( "poly7", poly07);
|
||||
symbol_table.add_function( "poly8", poly08);
|
||||
symbol_table.add_function( "poly9", poly09);
|
||||
symbol_table.add_function("poly10", poly10);
|
||||
|
||||
expression_t expression;
|
||||
expression.register_symbol_table(symbol_table);
|
||||
|
@ -2492,6 +2494,117 @@ inline bool run_test13()
|
|||
return true;
|
||||
}
|
||||
|
||||
template <typename Allocator,
|
||||
template <typename,typename> class Sequence>
|
||||
inline std::size_t load_expressions(const std::string& file_name,
|
||||
Sequence<std::string,Allocator>& sequence)
|
||||
{
|
||||
std::ifstream stream(file_name.c_str());
|
||||
if (!stream) return 0;
|
||||
std::string buffer;
|
||||
buffer.reserve(1024);
|
||||
std::size_t line_count = 0;
|
||||
while (std::getline(stream,buffer))
|
||||
{
|
||||
++line_count;
|
||||
sequence.push_back(buffer);
|
||||
}
|
||||
return line_count;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline bool run_test14()
|
||||
{
|
||||
typedef exprtk::expression<T> expression_t;
|
||||
|
||||
T x = T(0);
|
||||
T y = T(0);
|
||||
T z = T(0);
|
||||
T w = T(0);
|
||||
|
||||
exprtk::polynomial<T, 1> poly01;
|
||||
exprtk::polynomial<T, 2> poly02;
|
||||
exprtk::polynomial<T, 3> poly03;
|
||||
exprtk::polynomial<T, 4> poly04;
|
||||
exprtk::polynomial<T, 5> poly05;
|
||||
exprtk::polynomial<T, 6> poly06;
|
||||
exprtk::polynomial<T, 7> poly07;
|
||||
exprtk::polynomial<T, 8> poly08;
|
||||
exprtk::polynomial<T, 9> poly09;
|
||||
exprtk::polynomial<T,10> poly10;
|
||||
|
||||
exprtk::symbol_table<T> symbol_table;
|
||||
symbol_table.add_constants();
|
||||
symbol_table.add_variable("x",x);
|
||||
symbol_table.add_variable("y",y);
|
||||
symbol_table.add_variable("z",z);
|
||||
symbol_table.add_variable("w",w);
|
||||
symbol_table.add_function( "poly1", poly01);
|
||||
symbol_table.add_function( "poly2", poly02);
|
||||
symbol_table.add_function( "poly3", poly03);
|
||||
symbol_table.add_function( "poly4", poly04);
|
||||
symbol_table.add_function( "poly5", poly05);
|
||||
symbol_table.add_function( "poly6", poly06);
|
||||
symbol_table.add_function( "poly7", poly07);
|
||||
symbol_table.add_function( "poly8", poly08);
|
||||
symbol_table.add_function( "poly9", poly09);
|
||||
symbol_table.add_function("poly10", poly10);
|
||||
|
||||
expression_t expression;
|
||||
expression.register_symbol_table(symbol_table);
|
||||
|
||||
exprtk::parser<double> parser;
|
||||
|
||||
std::deque<std::string> expr_str_list;
|
||||
|
||||
if (0 == load_expressions("exprtk_functional_test.txt",expr_str_list))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
std::deque<exprtk::expression<double> > expression_list;
|
||||
bool failure = false;
|
||||
static const std::size_t rounds = 5;
|
||||
|
||||
for (std::size_t r = 0; r < rounds; ++r)
|
||||
{
|
||||
for (std::size_t i = 0; i < expr_str_list.size(); ++i)
|
||||
{
|
||||
exprtk::expression<double> current_expression;
|
||||
|
||||
current_expression.register_symbol_table(symbol_table);
|
||||
|
||||
if (!parser.compile(expr_str_list[i],current_expression))
|
||||
{
|
||||
printf("run_test14() - Error: %s Expression: %s\n",
|
||||
parser.error().c_str(),
|
||||
expr_str_list[i].c_str());
|
||||
return false;
|
||||
}
|
||||
else
|
||||
expression_list.push_back(current_expression);
|
||||
}
|
||||
|
||||
for (std::size_t i = 0; i < expression_list.size(); ++i)
|
||||
{
|
||||
double result = expression_list[i].value();
|
||||
if (result != T(1))
|
||||
{
|
||||
failure = true;
|
||||
printf("run_test14() - Error with expression: %s\n",
|
||||
expr_str_list[i].c_str());
|
||||
}
|
||||
}
|
||||
|
||||
expression_list.clear();
|
||||
|
||||
if (failure)
|
||||
break;
|
||||
}
|
||||
|
||||
return !failure;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
#define perform_test(Type,Number) \
|
||||
|
@ -2523,6 +2636,7 @@ int main()
|
|||
perform_test(double,11)
|
||||
perform_test(double,12)
|
||||
perform_test(double,13)
|
||||
perform_test(double,14)
|
||||
|
||||
#undef perform_test
|
||||
|
||||
|
|
Loading…
Reference in New Issue