missing/isnan.c


DEFINITIONS

This source file includes following functions.
  1. isnan
  2. isnan
  3. double_ne


   1  /* public domain rewrite of isnan(3) */
   2  
   3  #ifdef _MSC_VER
   4  
   5  #include <float.h>
   6  int
   7  isnan(n)
   8    double n;
   9  {
  10    return _isnan(n);
  11  }
  12  
  13  #else
  14  
  15  static int double_ne();
  16  
  17  int
  18  isnan(n)
  19    double n;
  20  {
  21    return double_ne(n, n);
  22  }
  23  
  24  static
  25  int
  26  double_ne(n1, n2)
  27    double n1, n2;
  28  {
  29    return n1 != n2;
  30  }
  31  #endif