[Numpy-svn] r3925 - trunk/numpy/core/src

numpy-svn@scip... numpy-svn@scip...
Sat Jul 28 07:24:55 CDT 2007


Author: pearu
Date: 2007-07-28 07:24:51 -0500 (Sat, 28 Jul 2007)
New Revision: 3925

Modified:
   trunk/numpy/core/src/umathmodule.c.src
Log:
Fix rint error and castings.

Modified: trunk/numpy/core/src/umathmodule.c.src
===================================================================
--- trunk/numpy/core/src/umathmodule.c.src	2007-07-28 12:19:04 UTC (rev 3924)
+++ trunk/numpy/core/src/umathmodule.c.src	2007-07-28 12:24:51 UTC (rev 3925)
@@ -36,13 +36,16 @@
 #ifndef HAVE_HYPOTF
 static float hypotf(float x, float y)
 {
-  return (float)hypot((float)(x), (float)(y));
+  return (float)hypot((double)(x), (double)(y));
 }
 #endif
 #ifndef HAVE_RINTF
+#ifndef HAVE_RINT
+static double rint (double x);
+#endif
 static float rintf(float x)
 {
-       return (float)rint((double) x);
+       return (float)rint((double)(x));
 }
 #endif
 #endif



More information about the Numpy-svn mailing list