[Numpy-svn] r6404 - branches/coremath/numpy/core/src

numpy-svn@scip... numpy-svn@scip...
Thu Feb 19 02:51:29 CST 2009


Author: cdavid
Date: 2009-02-19 02:51:20 -0600 (Thu, 19 Feb 2009)
New Revision: 6404

Modified:
   branches/coremath/numpy/core/src/umath_funcs.inc.src
Log:
Start using npymath functions in umath; all test pass on this one on Linux.

Modified: branches/coremath/numpy/core/src/umath_funcs.inc.src
===================================================================
--- branches/coremath/numpy/core/src/umath_funcs.inc.src	2009-02-19 08:50:58 UTC (rev 6403)
+++ branches/coremath/numpy/core/src/umath_funcs.inc.src	2009-02-19 08:51:20 UTC (rev 6404)
@@ -62,7 +62,7 @@
     if (u == 1) {
         return LOG2E*x;
     } else {
-        return log2@c@(u) * x / (u - 1);
+        return npy_log2@c@(u) * x / (u - 1);
     }
 }
 
@@ -75,7 +75,7 @@
     } else if (u - 1 == -1) {
         return -LOGE2;
     } else {
-        return (u - 1) * x/log2@c@(u);
+        return (u - 1) * x/npy_log2@c@(u);
     }
 }
 
@@ -84,10 +84,10 @@
 {
     const @type@ tmp = x - y;
     if (tmp > 0) {
-        return x + log1p@c@(exp@c@(-tmp));
+        return x + npy_log1p@c@(npy_exp@c@(-tmp));
     }
     else {
-        return y + log1p@c@(exp@c@(tmp));
+        return y + npy_log1p@c@(npy_exp@c@(tmp));
     }
 }
 
@@ -96,10 +96,10 @@
 {
     const @type@ tmp = x - y;
     if (tmp > 0) {
-        return x + log2_1p@c@(exp2@c@(-tmp));
+        return x + log2_1p@c@(npy_exp2@c@(-tmp));
     }
     else {
-        return y + log2_1p@c@(exp2@c@(tmp));
+        return y + log2_1p@c@(npy_exp2@c@(tmp));
     }
 }
 



More information about the Numpy-svn mailing list