summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPauli Virtanen <pav@iki.fi>2008-07-19 21:56:46 +0000
committerPauli Virtanen <pav@iki.fi>2008-07-19 21:56:46 +0000
commita7c080edd594f8e84b9edd555c2f2d981a8b3c31 (patch)
treeee99ddaab73250b5912440890066d4ac2c9b4139
parentd5300c2b68cbdb4dabe73b50a0f650b80d8d8d23 (diff)
downloadnumpy-a7c080edd594f8e84b9edd555c2f2d981a8b3c31.tar.gz
Fix arccosh branch cut. Remove one unnecessary operation from nc_asinh.
-rw-r--r--numpy/core/src/umathmodule.c.src10
1 files changed, 5 insertions, 5 deletions
diff --git a/numpy/core/src/umathmodule.c.src b/numpy/core/src/umathmodule.c.src
index d3c1d8e1a..9096cdbf1 100644
--- a/numpy/core/src/umathmodule.c.src
+++ b/numpy/core/src/umathmodule.c.src
@@ -825,15 +825,16 @@ nc_acosh@c@(c@typ@ *x, c@typ@ *r)
c@typ@ t;
nc_sum@c@(x, &nc_1@c@, &t);
+ nc_sqrt@c@(&t, &t);
nc_diff@c@(x, &nc_1@c@, r);
- nc_prod@c@(&t, r, r);
nc_sqrt@c@(r, r);
+ nc_prod@c@(&t, r, r);
nc_sum@c@(x, r, r);
nc_log@c@(r, r);
return;
/*
return nc_log(nc_sum(x,
- nc_sqrt(nc_prod(nc_sum(x,nc_1), nc_diff(x,nc_1)))));
+ nc_prod(nc_sqrt(nc_sum(x,nc_1)), nc_sqrt(nc_diff(x,nc_1)))));
*/
}
@@ -863,12 +864,11 @@ nc_asinh@c@(c@typ@ *x, c@typ@ *r)
nc_prod@c@(x, x, r);
nc_sum@c@(&nc_1@c@, r, r);
nc_sqrt@c@(r, r);
- nc_diff@c@(r, x, r);
+ nc_sum@c@(r, x, r);
nc_log@c@(r, r);
- nc_neg@c@(r, r);
return;
/*
- return nc_neg(nc_log(nc_diff(nc_sqrt(nc_sum(nc_1,nc_prod(x,x))),x)));
+ return nc_log(nc_sum(nc_sqrt(nc_sum(nc_1,nc_prod(x,x))),x));
*/
}