Prepended std:: to iostream classes to satisfy g++.
cmath is preferred to math.h