Source: http://umich.edu/~eecs381/handouts/MathFunctions.pdf