int finite(double x);
This function returns 1 if x is finite, and 0 if x is infinite or NaN. It does not cause any errors or exceptions.