required #include <math.h> for Windows