include <math.h> before checking INFINITY, NAN and other math.h
constants.