Subversion Repositories Kolibri OS

Rev

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

  1. /*
  2.  * ====================================================
  3.  * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
  4.  *
  5.  * Developed at SunPro, a Sun Microsystems, Inc. business.
  6.  * Permission to use, copy, modify, and distribute this
  7.  * software is freely granted, provided that this notice
  8.  * is preserved.
  9.  * ====================================================
  10.  */
  11.  
  12. /*
  13.  * __isnanf(x) returns 1 is x is nan, else 0;
  14.  */
  15.  
  16. #include "fdlibm.h"
  17.  
  18. int
  19. _DEFUN (__isnanf, (x),
  20.         float x)
  21. {
  22.         __int32_t ix;
  23.         GET_FLOAT_WORD(ix,x);
  24.         ix &= 0x7fffffff;
  25.         return FLT_UWORD_IS_NAN(ix);
  26. }
  27.  
  28. #ifdef _DOUBLE_IS_32BITS
  29.  
  30. int
  31. _DEFUN (__isnand, (x),
  32.         double x)
  33. {
  34.         return __isnanf((float) x);
  35. }
  36.  
  37. #endif /* defined(_DOUBLE_IS_32BITS) */
  38.