Math function calculator.