]> gitweb.factorcode.org Git - factor.git/commitdiff
Median uses /i now instead of /
authorDoug Coleman <erg@trifocus.net>
Mon, 31 Oct 2005 18:13:27 +0000 (18:13 +0000)
committerDoug Coleman <erg@trifocus.net>
Mon, 31 Oct 2005 18:13:27 +0000 (18:13 +0000)
contrib/math/statistics.factor

index ac52361941c84b742fe5cf443e661f8d3c139e2b..9c9639f9e2266d735a3cf6640a264a9a4212c7ec 100644 (file)
@@ -18,7 +18,7 @@ USING: kernel math sequences ;
     number-sort dup length dup even? [
         1+ 2 /i dup 1- rot [ nth ] keep swapd nth + 2 /
     ] [
-        2 / swap nth
+        2 /i swap nth
     ] if ;
 
 : range ( seq -- n )
@@ -36,4 +36,3 @@ USING: kernel math sequences ;
 : std
     #! standard deviation, sqrt of variance
     var sqrt ;
-