Add support for some math functions.

Exercise 4-5.