summaryrefslogtreecommitdiff
path: root/numpy/random
diff options
context:
space:
mode:
authorRalf Gommers <ralf.gommers@googlemail.com>2011-04-22 19:52:39 +0200
committerRalf Gommers <ralf.gommers@googlemail.com>2011-04-22 19:52:39 +0200
commit137ec8ec96434da6449d9c8e0303bf027f3eef00 (patch)
tree58e72f086accd1fde478f9bcacd4027bdcdd354a /numpy/random
parent9fc9db1df4df31c12c3f758bea8c6465313d9aef (diff)
downloadnumpy-137ec8ec96434da6449d9c8e0303bf027f3eef00.tar.gz
BUG: fix random.test_noncentral_f issue under win64 + MSVC9. Closes #1801.
Thanks to Christoph Gohlke for the patch.
Diffstat (limited to 'numpy/random')
-rw-r--r--numpy/random/mtrand/distributions.c4
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)