int isfinite(fpval): Returns nonzero if fpval is finite : isfinite « math.h « C / ANSI-C






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

*/
           
       








Related examples in the same category