C Tutorial/math.h/isfinite
int isfinite(fpval): Returns nonzero if fpval is finite.
#include <stdio.h>
#include <math.h>
int main(void)
{
printf("isfinite(-1.0) %d\n", isfinite(-1.0));
printf("isfinite(1.0) %d\n", isfinite(1.0));
printf("isfinite(1.0/0.0) %d\n", isfinite(1.0/0.0));
return 0;
}
isfinite(-1.0) 1 isfinite(1.0) 1 isfinite(1.0/0.0) 0