Open donpir opened 8 years ago
This is the JUnit testing code to reproduce the issue
`
def testFormulaWithConstValues() {
val filterFormula : String = "Peak > mean - 4,7 * stddev";
val variables = Map[String, Double]("Peak" -> 10, "mean" -> 10, "stddev" -> 0);
val expres = new MathExpEvaluator(filterFormula).evaluate(variables);
expres match {
case res : DTBool => assertFalse(res.value)
case _ => fail();
}
}
`
JMATRW4Analystics has a module to parse string with mathematical expressions and produce a syntax tree. Actually the library does not read decimal constants.