pete-9.c is the last of nine entries an anonymous "Pete" submitted to Bignum Bakeoff.[1] It only slightly differs from its predecessor pete-8.c which was a failed attempt at improving upon Pete's largest entry, pete-7.c. Both pete-9.c and pete-8.c produce a much smaller number than pete-7.c because the f(n) function Pete defines in these programs has a bug which causes it to merely square a previously defined number. The only difference between the output of pete-9.c and pete-8.c is that pete-9.c uses 99 at one point instead of 999.
The output of pete-9.c can be precisely expressed as \(z^{16\cdot17^6}(99)\), where \(z(n) = 9\cdot 2^n\).
Approximations in other notations[]
Notation | Approximation |
---|---|
Up-arrow notation | \(2 \uparrow\uparrow 386,201,107\) |
Hyper-E notation | \(E30.234821852519136\#386,201,104\) |
Chained arrow notation | \(2 \rightarrow 386,201,107 \rightarrow 2\) |
Hyperfactorial array notation | \(386,201,107!1\) |
Fast-growing hierarchy | \(f_3(386,201,107)\) |
Hardy hierarchy | \(H_{\omega^3}(386,201,107)\) |
Slow-growing hierarchy | \(g_{\varepsilon_0}(386,201,107)\) |
Code[]
#define Z (9<<(9<< #define Y Z Z Z Z Z Z Z Z #define W )))))))))))))))) #define Q Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y #define O W W W W W W W W W W W W W W W W W #define P Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q #define M O O O O O O O O O O O O O O O O O #define L P P P P P P P P P P P P P P P P P #define K M M M M M M M M M M M M M M M M M #define H L L L L L L L L L L L L L L L L L #define J K K K K K K K K K K K K K K K K K #define A H H H H H H H H H H H H H H H H H #define D J J J J J J J J J J J J J J J J J #define X A A A A A A A A A A A A A A A A A 99\ D D D D D D D D D D D D D D D D D int B = X; f(int* a) { int C = B, b[X], n = X; while(n--) b[n] = a[n]; if(b[n = X - 1]--) while(C--) B = f(b); while(n && !(b[n] = B, b[--n]--)) ; return n ? f(b) : B * B; } main() { int a[X] = {X}; return f(a); }
Sources[]
See also[]
Large numbers in computers
Main article: Numbers in computer arithmetic
127 · 128 · 256 · 32767 · 32768 · 65536 · 2147483647 · 4294967296 · 9007199254740991 · 9223372036854775807 · FRACTRAN catalogue numbersBignum Bakeoff contestants: pete-3.c · pete-9.c · pete-8.c · harper.c · ioannis.c · chan-2.c · chan-3.c · pete-4.c · chan.c · pete-5.c · pete-6.c · pete-7.c · marxen.c · loader.c
Channel systems: lossy channel system · priority channel system
Concepts: Recursion