| 127 | } |
| 128 | |
| 129 | static bool IsEqual(const TString& a, const TString& b, const double eps) { |
| 130 | double aVal = 0.0; |
| 131 | double bVal = 0.0; |
| 132 | if (TryFromString<double>(a, aVal) && TryFromString<double>(b, bVal)) { |
| 133 | return fabs(aVal - bVal) < eps; |
| 134 | } |
| 135 | // okay, compare as strings |
| 136 | return a == b; |
| 137 | } |
| 138 | |
| 139 | static TString CalcExpression(const char* expr, size_t a, size_t b, const IExpressionAdaptor& data) { |
| 140 | // Cannot compare values less than 1e-5 |
no test coverage detected