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

numpy-svn@scip... numpy-svn@scip...
Sat Sep 20 11:01:25 CDT 2008


Author: cdavid
Date: 2008-09-20 11:01:22 -0500 (Sat, 20 Sep 2008)
New Revision: 5847

Modified:
   branches/clean_math_config/numpy/core/src/math_c99.inc.src
Log:
Use a single macro for isinf 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 16:00:09 UTC (rev 5846)
+++ branches/clean_math_config/numpy/core/src/math_c99.inc.src	2008-09-20 16:01:22 UTC (rev 5847)
@@ -140,25 +140,7 @@
 #endif
 
 #if !defined(HAVE_DECL_ISINF)
-    # define isinf(x) \
-              (sizeof (x) == sizeof (long double) ? isinf_ld (x) \
-               : sizeof (x) == sizeof (double) ? isinf_d (x) \
-               : isinf_f (x))
-
-static int isinf_f (float x)
-{
-    return isnan (x - x);
-}
-
-static int isinf_d (double x)
-{
-    return isnan (x - x);
-}
-
-static int isinf_ld (long double x)
-{
-    return isnan (x - x);
-}
+    # define isinf(x) isnan((x) - (x))
 #endif
 
 #if !defined(HAVE_DECL_SIGNBIT)



More information about the Numpy-svn mailing list