use cmath instead of math.h