Update math.c

Added comments and removed unneeded code.