Merge branch 'master' of git://factorcode.org/git/factor
commit
cd8f20aa88
|
@ -3,7 +3,8 @@ prettyprint words hints ;
|
||||||
IN: benchmark.partial-sums
|
IN: benchmark.partial-sums
|
||||||
|
|
||||||
: summing ( n quot -- y )
|
: 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 ;
|
: 2/3^k ( n -- y ) [ 2.0 3.0 / swap 1- ^ ] summing ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue