Clone of arithmetic evaluator by Bartosz Milewski