[Numpy-svn] r5633 - trunk/numpy/random/mtrand

numpy-svn@scip... numpy-svn@scip...
Tue Aug 12 17:01:42 CDT 2008


Author: rkern
Date: 2008-08-12 17:01:42 -0500 (Tue, 12 Aug 2008)
New Revision: 5633

Modified:
   trunk/numpy/random/mtrand/distributions.c
Log:
BUG: F distributions need the appropriate scale factor.

Modified: trunk/numpy/random/mtrand/distributions.c
===================================================================
--- trunk/numpy/random/mtrand/distributions.c	2008-08-12 21:12:14 UTC (rev 5632)
+++ trunk/numpy/random/mtrand/distributions.c	2008-08-12 22:01:42 UTC (rev 5633)
@@ -225,7 +225,8 @@
 
 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)



More information about the Numpy-svn mailing list