diff options
author | Jaime Fernandez <jaime.frio@gmail.com> | 2015-04-23 22:54:33 -0700 |
---|---|---|
committer | Jaime Fernandez <jaime.frio@gmail.com> | 2015-04-23 22:54:33 -0700 |
commit | 5d0f474de2a6ac953b6a26abb54515640db64bbf (patch) | |
tree | ce257760b3218d17a26d6da9d70a515815dce1da /numpy/random | |
parent | b4245a9af8c64025ee284c937e73ef9e2c0d7331 (diff) | |
download | numpy-5d0f474de2a6ac953b6a26abb54515640db64bbf.tar.gz |
MANT: Use labs, not fabs, for integer abs in distributions.c
Diffstat (limited to 'numpy/random')
-rw-r--r-- | numpy/random/mtrand/distributions.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/random/mtrand/distributions.c b/numpy/random/mtrand/distributions.c index 6d9a23ced..84174e105 100644 --- a/numpy/random/mtrand/distributions.c +++ b/numpy/random/mtrand/distributions.c @@ -42,6 +42,7 @@ */ #include <math.h> +#include <stdlib.h> #include "distributions.h" #include <stdio.h> @@ -315,7 +316,7 @@ long rk_binomial_btpe(rk_state *state, long n, double p) v = v*(u-p3)*lamr; Step50: - k = fabs(y - m); + k = labs(y - m); if ((k > 20) && (k < ((nrq)/2.0 - 1))) goto Step52; s = r/q; |