#include <math.h> int isinf(double value);
The isinf() function returns -1 if value represents negative infinity, 1 if value represents positive infinity, and 0 otherwise.