Harper.c is a number entered in the Bignum Bakeoff contest.[1], by Russel Harper[2].
The upper bound is E(2**(2**(10**8+2))) and the higher bound E(2**(2**(10**8+3))). Here x**y denotes x to the power of y and E(x) is 2 tetrated to the xth.
Program[]
The C program is the following:
#define I int #define w while #define r return I l(I x){I y=x;w(y--)x*=x;r x;} I k(I x,I y){w(y--)x*=k(x,y)*l(x);r x;} I j(I x,I y){w(y--)x*=j(x,y)*k(x,y);r x;} I i(I x,I y){w(y--)x*=i(x,y)*j(x,y);r x;} I h(I x,I y){w(y--)x*=h(x,y)*i(x,y);r x;} I g(I x,I y){w(y--)x*=g(x,y)*h(x,y);r x;} I f(I x,I y){w(y--)x*=f(x,y)*g(x,y);r x;} I e(I x,I y){w(y--)x*=e(x,y)*f(x,y);r x;} I d(I x,I y){w(y--)x*=d(x,y)*e(x,y);r x;} I c(I x,I y){w(y--)x*=c(x,y)*d(x,y);r x;} I b(I x,I y){w(y--)x*=b(x,y)*c(x,y);r x;} I a(I x,I y){w(y--)x*=a(x,y)*b(x,y);r x;} I main(void){r a(9<<99999999,9<<99999999);}
In practice, running the program would result in an integer overflow, considering that the int
data type in C can represent numbers with up to 2 or 4 bytes depending on the platform.[3] However, if there was no integer overflows, the program would output the Harper.c number.
References[]
- ↑ http://djm.cc/bignum-results.txt
- ↑ rharper1661@rogers.com
- ↑ https://www.tutorialspoint.com/cprogramming/c_data_types.htm
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