Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | RSS feed

  1. /*
  2.  * nan () returns a nan.
  3.  * Added by Cygnus Support.
  4.  */
  5.  
  6. /*
  7. FUNCTION
  8.         <<nan>>, <<nanf>>---representation of ``Not a Number''
  9.  
  10. INDEX
  11.         nan
  12. INDEX
  13.         nanf
  14.  
  15. ANSI_SYNOPSIS
  16.         #include <math.h>
  17.         double nan(const char *);
  18.         float nanf(const char *);
  19.  
  20. TRAD_SYNOPSIS
  21.         #include <math.h>
  22.         double nan();
  23.         float nanf();
  24.  
  25.  
  26. DESCRIPTION
  27.         <<nan>> and <<nanf>> return an IEEE NaN (Not a Number) in
  28.         double- and single-precision arithmetic respectively.  The
  29.         argument is currently disregarded.
  30.  
  31. QUICKREF
  32.         nan - pure
  33.  
  34. */
  35.  
  36. #include "fdlibm.h"
  37.  
  38. #ifndef _DOUBLE_IS_32BITS
  39.  
  40.         double nan(const char *unused)
  41. {
  42.         double x;
  43.  
  44.         INSERT_WORDS(x,0x7ff80000,0);
  45.         return x;
  46. }
  47.  
  48. #endif /* _DOUBLE_IS_32BITS */
  49.