c 2b 2b double is nan

Solutions on MaxInterview for c 2b 2b double is nan by the best coders in the world

showing results for - "c 2b 2b double is nan"
Lyam
13 Aug 2018
1/* isnan example */
2#include <stdio.h>      /* printf */
3#include <math.h>       /* isnan, sqrt */
4
5int main()
6{
7  printf ("isnan(0.0)       : %d\n",isnan(0.0));
8  printf ("isnan(1.0/0.0)   : %d\n",isnan(1.0/0.0));
9  printf ("isnan(-1.0/0.0)  : %d\n",isnan(-1.0/0.0));
10  printf ("isnan(sqrt(-1.0)): %d\n",isnan(sqrt(-1.0)));
11  return 0;
12}