Merge branch 'master' of git://factorcode.org/git/factor

db4
Doug Coleman 2008-05-07 14:22:12 -05:00
commit cd8f20aa88
1 changed files with 2 additions and 1 deletions

View File

@ -3,7 +3,8 @@ prettyprint words hints ;
IN: benchmark.partial-sums
: summing ( n quot -- y )
[ + ] compose 0.0 -rot 1 -rot (each-integer) ; inline
[ >float ] swap [ + ] 3compose
0.0 -rot 1 -rot (each-integer) ; inline
: 2/3^k ( n -- y ) [ 2.0 3.0 / swap 1- ^ ] summing ;