[Numpy-svn] r5456 - branches/1.1.x/numpy/core/src
numpy-svn at scipy.org
numpy-svn at scipy.org
Sat Jul 19 13:22:35 EDT 2008
Author: charris
Date: 2008-07-19 12:22:33 -0500 (Sat, 19 Jul 2008)
New Revision: 5456
Modified:
branches/1.1.x/numpy/core/src/umathmodule.c.src
Log:
Fix arccosh and arcsinh implementations for complex numbers.
Modified: branches/1.1.x/numpy/core/src/umathmodule.c.src
===================================================================
--- branches/1.1.x/numpy/core/src/umathmodule.c.src 2008-07-19 14:15:47 UTC (rev 5455)
+++ branches/1.1.x/numpy/core/src/umathmodule.c.src 2008-07-19 17:22:33 UTC (rev 5456)
@@ -825,16 +825,16 @@
c at typ@ t;
nc_sum at c@(x, &nc_1 at c@, &t);
+ nc_sqrt at c@(&t, &t);
nc_diff at c@(x, &nc_1 at c@, r);
- nc_prod at c@(&t, r, r);
nc_sqrt at c@(r, r);
+ nc_prod at c@(&t, r, r);
nc_sum at c@(x, r, r);
nc_log at c@(r, r);
return;
/*
- return nc_log(nc_sum(x,
- nc_sqrt(nc_prod(nc_sum(x,nc_1), nc_diff(x,nc_1)))));
- */
+ * log(x + sqrt(x + 1)*sqrt(x - 1)
+ */
}
static void
@@ -863,13 +863,12 @@
nc_prod at c@(x, x, r);
nc_sum at c@(&nc_1 at c@, r, r);
nc_sqrt at c@(r, r);
- nc_diff at c@(r, x, r);
+ nc_sum at c@(r, x, r);
nc_log at c@(r, r);
- nc_neg at c@(r, r);
return;
/*
- return nc_neg(nc_log(nc_diff(nc_sqrt(nc_sum(nc_1,nc_prod(x,x))),x)));
- */
+ * log(x + sqrt(1 + x**2))
+ */
}
static void
More information about the Numpy-svn
mailing list