Included cmath in common.hpp to avoid isnan complaints from the xcode co...

...mpiler
Consider moving <cmath> above <map> so they are ordered alphabetically :)