[ prog / sol / mona ]

prog


e and the Stern-Brocot tree

43 2021-02-27 11:19

Here is stream index 10^12 in the e stream, to check against other implementations.
http://0x0.st/-K_o.gz

$ gawk '{ if (length ($0) < 1000) { print NR ": " $0 } else { print NR "! " length ($0) } }' e12.txt
1:  group List (Fixed RRLRR, List (Loop (499998, List (Store (a, List (Load (a, Fixed LR), Load (l4, Fixed LLLL))), Store (b, List (Load (b, Fixed RLRR), Load (r4, Fixed RRRR))))), List (Fixed LR, Expo (Fixed L, 1999996), Fixed RL, Expo (Fixed R, 999999))))
2: target 2.718281828459045
3: result 2.718281828459045
4! 6167766
5! 6167765
6: stack 12

The download is nearly 6 megabytes, the uncompressed file just over 12 megabytes and the numerator has 6167766 digits, so text editors might not like it.

>>40
Do not feed.

54


VIP:

do not edit these