[Numpy-svn] r5846 - branches/clean_math_config/numpy/core/src

numpy-svn@scip... numpy-svn@scip...
Sat Sep 20 11:00:13 CDT 2008


Author: cdavid
Date: 2008-09-20 11:00:09 -0500 (Sat, 20 Sep 2008)
New Revision: 5846

Modified:
   branches/clean_math_config/numpy/core/src/math_c99.inc.src
Log:
Use a single macro for isnan replacement.

Modified: branches/clean_math_config/numpy/core/src/math_c99.inc.src
===================================================================
--- branches/clean_math_config/numpy/core/src/math_c99.inc.src	2008-09-20 15:58:44 UTC (rev 5845)
+++ branches/clean_math_config/numpy/core/src/math_c99.inc.src	2008-09-20 16:00:09 UTC (rev 5846)
@@ -136,24 +136,7 @@
  *****************************************************************************
  */
 #if !defined(HAVE_DECL_ISNAN)
-    # define isnan(x) \
-              (sizeof (x) == sizeof (long double) ? isnan_ld (x) \
-               : sizeof (x) == sizeof (double) ? isnan_d (x) \
-               : isnan_f (x))
-static int isnan_f  (float x)
-{
-    return x != x;
-}
-
-static int isnan_d  (double x)
-{
-    return x != x;
-}
-
-static int isnan_ld  (long double x)
-{
-    return x != x;
-}
+    # define isnan(x) ((x) != (x))
 #endif
 
 #if !defined(HAVE_DECL_ISINF)



More information about the Numpy-svn mailing list