summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
Diffstat (limited to 'numpy')
-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)