1 ! Copyright (C) 2009 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: decimals kernel locals math math.combinatorics math.ranges
5 IN: benchmark.e-decimals
7 :: calculate-e-decimals ( n -- e )
8 n [1,b] [ factorial 0 <decimal> D: 1 swap n D/ ] map
11 : calculate-e-decimals-benchmark ( -- )
12 5 [ 800 calculate-e-decimals drop ] times ;
14 MAIN: calculate-e-decimals-benchmark