Implemented a better static evaluator for arithmetic.