My realization of some math functions.