diff options
| author | Ralf Gommers <ralf.gommers@googlemail.com> | 2011-04-22 19:52:39 +0200 |
|---|---|---|
| committer | Ralf Gommers <ralf.gommers@googlemail.com> | 2011-04-22 20:12:31 +0200 |
| commit | 7bb23a7ee6d48c58c8d35d9df5ec90f0bf2100bd (patch) | |
| tree | 3eaddd0dd7e5de375a1c9d8f064f63e7f1ed22f5 | |
| parent | 5ea609c238152e57c95538a421bd424602ff01e0 (diff) | |
| download | numpy-7bb23a7ee6d48c58c8d35d9df5ec90f0bf2100bd.tar.gz | |
BUG: fix random.test_noncentral_f issue under win64 + MSVC9. Closes #1801.
Thanks to Christoph Gohlke for the patch.
(backport of 137ec8e)
| -rw-r--r-- | numpy/random/mtrand/distributions.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/random/mtrand/distributions.c b/numpy/random/mtrand/distributions.c index 39bd82f4a..d792cf86d 100644 --- a/numpy/random/mtrand/distributions.c +++ b/numpy/random/mtrand/distributions.c @@ -231,8 +231,8 @@ double rk_f(rk_state *state, double dfnum, double dfden) double rk_noncentral_f(rk_state *state, double dfnum, double dfden, double nonc) { - return ((rk_noncentral_chisquare(state, dfnum, nonc)*dfden) / - (rk_chisquare(state, dfden)*dfnum)); + double t = rk_noncentral_chisquare(state, dfnum, nonc) * dfden; + return t / (rk_chisquare(state, dfden) * dfnum); } long rk_binomial_btpe(rk_state *state, long n, double p) |
