diff options
Diffstat (limited to 'numpy')
-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 0e64913b7..a4eaff66e 100644 --- a/numpy/random/mtrand/distributions.c +++ b/numpy/random/mtrand/distributions.c @@ -225,7 +225,8 @@ double rk_noncentral_chisquare(rk_state *state, double df, double nonc) double rk_f(rk_state *state, double dfnum, double dfden) { - return rk_chisquare(state, dfnum) / rk_chisquare(state, dfden); + return ((rk_chisquare(state, dfnum) * dfden) / + (rk_chisquare(state, dfden) * dfnum)); } double rk_noncentral_f(rk_state *state, double dfnum, double dfden, double nonc) |