Javascript Calculator Frequency javascript.EvaluatorException