Added math functions for generating random numbers.