Contact: aviboots(AT)netvision.net.il
39,844 questions
51,765 answers
573 users
#include <math.h> #include <stdio.h> int main() { double n = 0.0 / 0.0; // Produces NaN if (isnan(n)) { printf("n is NaN\n"); } else { printf("n is not NaN\n"); } return 0; } /* run: n is NaN */
#include <math.h> #include <stdio.h> int main() { double n = 0.0 / 0.0; // Produces NaN if (n != n) { printf("n is NaN\n"); } else { printf("n is not NaN\n"); } return 0; } /* run: n is NaN */