change math.h to cmath, to compile on windows