In one of the C ++ modules, we have an expression evaluation language.
\
EVDataElement NAME::eval( const EvalContext &ec, \
const bool recursiveFlag, \
EVEvaluatorTraceFormatter * trace ) \
{ \
/* EVTimer timer("(DECLARE_REL_EVAL)","eval","*", "", 1,1, 3); */ \
EVDataElement val ( \
(left->eval(ec, recursiveFlag, trace)) \
OP (right->eval(ec, recursiveFlag, trace)) ); \
return val; \
}
DECLARE_REL_EVAL(oLT,<)
DECLARE_REL_EVAL(oLE,<=)
DECLARE_REL_EVAL(oGT,>)
DECLARE_REL_EVAL(oGE,>=)
DECLARE_REL_EVAL(oEQ,==)
DECLARE_REL_EVAL(oNE,!=)
The module allows you to set specific configuration rules.
SO, if there was a rule in the database that specified field1 - field2> param1, it checks this condition by going to the above expression and returns the result.
The task that we are facing now is called param1 = 3, and field1 = 6.15, and field2 = 3.15
It says that the result is correct. And I think this is due to the fact that the difference in 6.15 and 3.15 leads to 3.00
And when 3.00 is compared to 3, he thinks 3.00 is more. Is there any way around this?
, , , , , . , .