Problem with math.h solved