Added math functions.