use <math.h> not <cmath>, etc