# Largest Number Printable

Your goal is to write a program that prints a number. The bigger the number, the more points you'll get. But be careful! Code length is both limited and heavily weighted in the scoring function. Your printed number will be divided by the cube of the number of bytes you used for your solution.

So, let's say you printed 10000000 and your code is 100 bytes long. Your final score will be $$\\frac {10000000} {100^3} = 10\$$.

There are other rules to follow, in order to make this challenge a bit harder.

• You cannot use digits in your code (0123456789);
• You can use mathematical/physical/etc. constants, but only if they are less than 10. (e.g. You can use $$\\pi \approx 3.14\$$ but you can't use the Avogadro constant $$\= 6\times 10^{23}\$$)
• Recursion is allowed but the generated number needs to be finite (so infinite is not accepted as a solution. Your program needs to terminate correctly, assuming unbounded time and memory, and generate the requested output);
• You cannot use the operations * (multiply), / (divide), ^ (power) nor any other way to indicate them (e.g. 2 div 2 is not allowed);
• Your program can output more than one number, if you need it to do that. Only the highest one will count for scoring;
• However, you can concatenate strings: this means that any sequence of adjacent digits will be considered as a single number;
• Your code will be run as-is. This means that the end-user cannot edit any line of code, nor he can input a number or anything else;
• Maximum code length is 100 bytes.

1. Steven H., Pyth $$\\approx f_{\varphi(1,0,0)+7}(256^{26})\$$
2. Simply Beautiful Art, Ruby $$\\approx f_{\varphi(1,0,0)}(3)\$$
3. Peter Taylor, GolfScript $$\\approx f_{\varepsilon_0+\omega+1}(17)\$$
4. r.e.s., GolfScript $$\\approx f_{\epsilon_0}^9(126)\approx f_{\epsilon_0+1}(9)\$$ [1]
5. Simply Beautiful Art, Ruby $$\\approx f_{\omega^{\omega2}+1}(126^22^{126})\$$
6. eaglgenes101, Julia $$\\approx f_{\omega^3}(127)\$$
7. col6y, Python 3, $$\\approx 127\to126\to\dots\to2\to1\approx f_{\omega^2}(127)\$$ [1][3]
8. Toeofdoom, Haskell, $$\\approx a_{20}(1)\approx f_{\omega+1}(18)\$$ [1]
9. Fraxtil, dc, $$\\approx 15\uparrow^{166665}15\$$ [3]
10. Magenta, Python, $$\\approx\mathrm{ack}(126,126)\approx10\uparrow^{124}129\$$
11. Kendall Frey, ECMAScript 6, $$\\approx1000\uparrow^43\$$ [1]
12. Ilmari Karonen, GolfScript, $$\\approx10\uparrow^310^{377}\$$ [1]
13. Aiden4, Rust, $$\\approx10\uparrow^3127\$$
14. BlackCap, Haskell, $$\\approx10\uparrow\uparrow65503\$$
15. recursive, Python, $$\\approx2\uparrow\uparrow11\approx10\uparrow\uparrow8.63297\$$ [1][3]
16. n.m., Haskell, $$\\approx2\uparrow\uparrow7\approx10\uparrow\uparrow4.63297\$$ [1]
17. David Yaw, C, $$\\approx10^{10^{4\times10^{22}}}\approx10\uparrow\uparrow4.11821\$$ [2]
18. primo, Perl, $$\\approx10^{(12750684161!)^{5\times2^{27}}}\approx10\uparrow\uparrow4.11369\$$
19. Art, C, $$\\approx10^{10^{2\times10^6}}\approx10\uparrow\uparrow3.80587\$$
20. Robert Sørlie, x86, $$\\approx10^{2^{2^{19}+32}}\approx10\uparrow\uparrow3.71585\$$
21. Tobia, APL, $$\\approx10^{10^{353}}\approx10\uparrow\uparrow3.40616\$$
22. Darren Stone, C, $$\\approx10^{10^{97.61735}}\approx10\uparrow\uparrow3.29875\$$
23. ecksemmess, C, $$\\approx10^{2^{320}}\approx10\uparrow\uparrow3.29749\$$
24. Adam Speight, vb.net, $$\\approx10^{5000\times2^{256}}\approx10\uparrow\uparrow3.28039\$$
25. Joshua, bash, $$\\approx10^{10^{15}}\approx10\uparrow\uparrow3.07282\$$

Footnotes

1. If every electron in the universe were a qubit, and every superposition thereof could be gainfully used to store information (which, as long as you don't actually need to know what's being stored is theoretically possible), this program requires more memory than could possibly exist, and therefore cannot be run - now, or at any conceiveable point in the future. If the author intended to print a value larger than ≈10↑↑3.26 all at once, this condition applies.
2. This program requires more memory than currently exists, but not so much that it couldn't theoretically be stored on a meager number of qubits, and therefore a computer may one day exist which could run this program.
3. All interpreters currently available issue a runtime error, or the program otherwise fails to execute as the author intended.
4. Running this program will cause irreparable damage to your system.

Edit @primo: I've updated a portion of the scoreboard using a hopefully easier to compare notation, with decimals to denote the logarithmic distance to the next higher power. For example $$\10↑↑2.5 = 10^{10^{\sqrt {10}}}\$$. I've also changed some scores if I believed to user's analysis to be faulty, feel free to dispute any of these.

Explanation of this notation:

If $$\0 \le b \lt 1\$$, then $$\a \uparrow\uparrow b = a^b\$$.

If $$\b \ge 1\$$, then $$\a \uparrow\uparrow b = a^{a \uparrow\uparrow (b-1)}\$$.

If $$\b \lt 0\$$, then $$\a \uparrow\uparrow b = \log_a(a \uparrow\uparrow (b+1))\$$

An implementation of this notation is provided in Python that let's you test reasonably sized values.

• Has someone explicitly said "base 10" yet? Jan 9, 2014 at 14:42
• Does the large number count if it's say 12e10 (12*10^10) as 12*10^10? Jan 9, 2014 at 19:36
• I think a better constraint instead of forbidding *, /, and ^, would've been to allow only linear operations, e.g. +, -, ++, --, +=, -=, etc. Otherwise, coders can take advantage of Knuth's up-arrow/Ackermann library functions if made available in their language of choice, which seems like cheating. Jan 10, 2014 at 0:19
• I'm still waiting to see someone earn footnote [4]. May 18, 2017 at 15:41
• Is a zero-byte program valid? Oct 21, 2021 at 15:43

# Braingolf, 10 bytes, final score: ≈ 10131 ≈ 10↑↑2.3257765097

#􏿿[l!_]


Note that 􏿿 is a 4 byte ASCII character with the value 1114111

Outputs every number from 2 to 1114111 with no spaces or other separators. Somewhere around 6.7m digits, but can we make it bigger...

# Braingolf, 100 bytes

#􏿿...............[l!_][l!_][l!_][l!_][l!_][l!_][l!_][l!_][l!_][l!_][l!_][l!_][l!_][l!_][l!_][l!_]


This does the same as above, but 16 times over. Meaning the final number is every number from 1 to 17825792 appended. 131m digits.

Not the largest or the winner by any stretch, but still pretty good, and probably as good as one can do in Braingolf given the banning of operators

# J, fω(256) / 50653

(<:@[$:~^:]])(>:@])@.(=(#>a.)"_)~#a.  ### Explanation: This makes use of what J calls a gerund: The  character is used to form a list of verbs, and the the verb following @. is used to select which verb to apply. This makes it equivalent to an if ... then ... else statement. Also, $: is equivalent to the largest verb containing it. However, since we use ~ to apply our dyad with its right argument as both arguments, this is also part of $:, which in the dyadic case flips the order of its arguments. Therefore, we use another ~ to un-flip them. And, one last bit, a: is an empty box, > unboxes it, and # takes the length. So, #>a: is 0 Using this, we can equivalently define this verb in a more ledgible, less golfed way: f =: dyad define if. x = 0 do. >:y else. (<:x) f^:y (y) end. )  Note: x is the left argument, y is the right This fits the definition of the fast-growing heirarchy. And then our program is f~ #a.. Now, #a. is the length of J's alphabet, which happens to be 256. Therefore, our program computes f256(256) = fω(256), since fω is defined as fn(n). Note: ^: is distinct from ^ : ^: is an adverb which is equivalent to a functional power, which I do not believe is disallowed in the OP # Come Here, score 1.03x1037 TELL"___________________________________________"-"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&"NEXT  Come Here handles string arithmetic weirdly. In the encoding used by the reference implementation, "_"-"&" is "9". Also, this program prints (in theory) a number slightly larger than 101098, however, it is not a valid answer to this question due to the restriction on using digits (and multiplication, for that matter; though I'm using it for string prepending here) in your code. 0CALL"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"cCALL0dCOME FROM SGNcCALL256*d+57d1CALLc-1cTELLdNEXT  • Note: the exact value of this number is 1111111111111111111111111111111111111111111/107811, or 10306101521283645556678920621375472921+25180/107811. Mar 26, 2016 at 11:29 • Also, note that due to padding, this outputs a trailing NUL byte. Mar 26, 2016 at 11:34 # TI-Basic, $$\10 \uparrow\uparrow 5.0039\$$(I think), 100 bytes {π,Xmax→L₁ Ans→L₂ LinReg(ax+b) Y₁ Equ▸String(Y₁,Str1 If not(N sub(Str1,Xscl,Xscl→Str2 Σx For(J,-Ans,Ans Ans+Ans→A End For(I,I-A,I-Xscl IS>(N,A prgmD DS<(N,Z Str2+Str2→Str2 End Ans  a fresh interpreter/calculator is needed, or with the following constants initialized: N,Z,I = 0 Xscl = 1 Xmin = -10 Xmax = 10  • I don't have a TI-84 CE, so I used this method to get a number in a string, the results is "1" in Str2 • for each iteration in the loop, another program is spawned until depth A and Str2 is doubled • Σx is the sum of L₁ (10+π) • here, $$\ A = (10+π) × 2^{27} = 1763834708\$$ • in practice, my TI-84+ SE doesn't have enough memory for A=3 ### Trying to calculate my score A more minimal code to analyze would be: For(I,I-A,I-1 IS>(N,A prgmD DS<(N,0 B+1→B End  with I and B initialized to zero and one respectively • For(: I will take the values I-A to I-1 included, and will be equal to I after the loop • IS>(: increments N and skips prgmD if N>A. N tracks the depth of the function so that it stops at depth A+1 • DS<(: very similar, decrements N, and never skip the next line in this case $$B = \sum_{I=0}^{A+1}(A^I) = \frac{A^{A+2}-1}{A-1} \approx A^A$$ B is the number of times the length of Str2 is doubled, giving the number: $$1.111 \times 10^{2^B} ≈ 10^{2^{A^A}} \approx 10^{2^{(1.7 \times 10^9)^{1.7 \times 10^9}}} \approx 10^{10^{10^{10^{10.2124}}}} \approx 10 \uparrow\uparrow 5.0039$$ ### Edit: • I was using cosh( which is kinda cheating, but now I allowed myself to use Xmin and Xmax (-10 and 10) My previous score was $$\ 10 \uparrow\uparrow 5.03 \$$ with cosh(cosh(Tmax→A ($$\ 3.6 \times 10^{11}\$$) • $$\ 10 \uparrow\uparrow 4.913 \rightarrow 10 \uparrow\uparrow 5.0039\$$ for using Σx instead of Xmax # Python 3, 95 bytes, score $$\\approx 10 \uparrow\uparrow 2.72087\$$ a=ord("~") g="a<<" c=eval(g+"a<<"+"<<".join("a"*a)) b=len(str(c)) print(eval("<<".join("b"*a)))  Try it online! • x << y << z is just x << (y + z), so we have c = 126 << (126 * 127) ~ 1.52181e4819. This makes b = 4820 and the final result is 4820 << (4820 * 125) ~ 1.80067e181374, or $10\uparrow\uparrow3.72087$. May 23, 2022 at 21:12 • Miscounted the number of $10$'s. You can try out the above calculations using the implementation added to the end of the question: a = TetrationDecimal(126); c = a * 2 ** (a * (a + 1)); b = int(log(c, 10)) + 1; result = b * 2 ** (b * (a - 1)). May 29, 2022 at 19:22 # Python 3, score $$\\approx 10 \uparrow\uparrow 3.45913\$$ a=ord("~") print(eval(f"'{a}'*"+f"{a}"*a+f"{a}"*a))  The result overflows python, and I don't know how to calculate the score. Here, + means string concatenation, and * is string repetition. • You are aware that 999 contains digits, aren't you? Dec 1, 2021 at 15:38 • @pxeger oops, fixed Dec 1, 2021 at 15:41 • "126" * n is approximately $0.126126\ldots\times10^{3n}$, which is how you can estimate your score. May 23, 2022 at 21:00 ## Mathematica, score $$\ 10^{1048576^{1048576 \times 2^{1048576^2}}} \approx 10 \uparrow\uparrow 5.02590 \$$ p=⌈Pi⌉;a=Table[#,p,p,p,p,p,p,p,p,p,p]&;p=Total[a[p],p];""<>Nest[Nest[(a=a@*a)@#&,#,p]&,ToString@p,p]  Explanation: p=⌈Pi⌉;  Straightforwardly, sets p to 4 a=Table[#,p,p,p,p,p,p,p,p,p,p]&;  Assigns a to be the function to make a 10-dimentional 'square' array with length p on all sides. p=Total[a[p],p]  puts p into a, and takes the sum of the entire flattened array. Effectively p=p^10, so p is now 1048576 ToString@p  Converts p to a string, so string manipulations work on it (a=a@*a)@#&  Every time this lambda function is called, it redefines a to be a applied to itself once, in effect doubling the a's power every time, and returns that doubled function. Nest[Nest[...,p],...,p]  The outer Nest calls the inner nest p times. The inner nest called the above function p times. This means that the self-doubling function is called p^2 times. The Length of this string is approximately equal to it's base 10 log, so tablePs = 10; p = ⌈Pi⌉ ^ tablePs; power = 2 ^ (p ^ 2 +1) -2; Log10[p] (tablePs * p * power)  1.017*10330985980550 And it's logs, 3.3*1011 11.5 1.06 0.0259 As multiplication and exponents were disallowed, I avoided using the Factorial, Cosh, or other non-linear mathematical operators out of spirit for the challenge. • 10^(1.25286 * 10^123) = 10^10^10^10^0.320198 = 10^^4.320198, not 10^^3.320198. Oct 22, 2021 at 2:35 • @SimplyBeautifulArt As much as I wish to be in the 10↑↑4. range, 10^10^123 is right between places 21 (10^10^353) and 22 (10^10^97), between 10↑↑3.2 and 10↑↑3.4. Unless my brain is just addled from all the big number math at this point? Oct 22, 2021 at 4:58 • I'll edit it later, since there are several new submissions. I try not to edit the leaderboard too frequently. Oct 22, 2021 at 5:23 • I guess I miscalculated and your score is 10 ^^ 5.02590 according to the tetration implementation I added at the end of the question, which makes sense when I write it out. May 29, 2022 at 20:05 # Java (JDK) ## v0.0.1: $$\6.3\times 10^{72^{5}}/96^3\approx10\uparrow\uparrow4.96786\$$ q->{int a='\t'+'\t',b=a+a,c=b+b;return(""+b).repeat(b).repeat(c).repeat(c).repeat(c).repeat(c);}  Try it online! ## v0.1.1: $$\\left(10^{1762613844998129336721604609} - 1\right)/96^3 \approx 10 \uparrow\uparrow 3.15694\$$ i->{int n='\t',a=n-n,c=a,b=n<<n+n+n;for(;a++<b;)for(;c++<b;)System.out.print((n+"").repeat(b));}  Try it online! • Did you perhaps mean to do (""+c).repeat(c)? Also assuming the estimated result is accurate, 6.3 * 10^72^5 / 96^3 is approximately 10^10^10^0.96786 = 10^^3.96786. Oct 22, 2021 at 2:42 • I actually didn't. I need to use these smaller numbers here because otherwise the String overflows and errors. ;) – 0xff Oct 22, 2021 at 7:02 • @SimplyBeautifulArt Added a wayyy better answer. Would you mind finding out the Knuth up-arrow notation for it? I really tried finding stuff online but I can't find any helpful ressources. – 0xff Oct 22, 2021 at 10:43 • You just apply some rounding (e.g. ignoring the -1) and log10 using log rules until it goes below 1.0, in this case it is log10(log10(log10(1762613844998129336721604609 - 3 * log10(96)))) = 0.15694 after 4 steps of log10. Oct 23, 2021 at 0:51 • I seem to have miscounted an extra power of 10. You can check it out (as well as the tetration logic) in the implementation I added to the end of the question. May 29, 2022 at 20:08 # TI-Basic, $$\7.37 \times 10^{127} / 56^3 \approx 10 \uparrow\uparrow 2.31985\$$ Tmax+Tmax+e→Z Ans+Ans+Ans+Ans+Ans→X cosh(Ans+Ans+Ans→Y For(I,~π,X+Z For(Y,Y,Y,Y End End Y  Higher score now thanks to MarcMush. • It's actually possible to get numbers greater than 1e99 with some For( trickery, I could get 7.37e127 but I don't know if scientific notation is allowed Oct 21, 2021 at 9:10 • -2 bytes: replace pi+pi (3 bytes) with Tmax (2 bytes, in vars, default is 2pi) Oct 22, 2021 at 1:23 • I seem to have miscounted an extra power of 10. You can check out the implementation for the tetration calculations at the end of the question. May 29, 2022 at 20:10 # Nim, 100 bytes import math let c=uint(' ') for i in c-c..(uint('#')-c)^c:stdout.write i,i,i,i,i,i,i,i,i,i,i,i,i,i,i Attempt This Online! # Pyth, score $$\\approx f_{\psi(\Omega_\omega)+\omega}(5)/92^3\$$ D:GHNR?qHGN?G,:hGHN:@GhZHNZL?hb:,yhb@bhZ@bhZ,yhb@bhZ@bhZKCGFYKFdKFkKFQKFzKFTK=J,JZ;WJ=hK=yJK  This is essentially a port of Patcail's program to Pyth. I added some layers of recursion boosting it from $$\\psi(\Omega_\omega)\$$ to $$\\psi(\Omega_\omega)+5\$$ (I kind of ran out of variables to use for the loops). The function y is exactly the same as Patcail's P, while the : is a helper function to do the substitution. Also for golfy reasons the code does print out multiple numbers (over $$\f_{\psi(\Omega_\omega)+\omega}(5)\$$ numbers, in fact). Also 0 and 1 are used as Z and hZ (should be legal, since h is just addition and Z is a constant less than 10). Given that Steven uses CG I also used it in this program. # Python, $$\\frac{f_{127}(2047)}{1000000}\$$ where $$\f_0(n)=n+1\$$ and $$\f_x(n)=f_{x-1}^n(n)\$$ (superscript means function repetition) f=lambda x,y:-~y if not x else[y:=f(~-x,y)for _ in range(y)][-g("")] g=ord print(f(g(""),g("߿")))  First g contains the character 0x01, second g contains the character 0x7f. Grows quite quickly $$\(f_3(3)\text{ already has 121 million digits!})\$$ Try it online! If anyone knows the name of the function $$\f\$$, please leave a comment It’s the fast-growing hierarchy. ## Individual hex values (hexdump) 0x0066 0x003d 0x006c 0x0061 0x006d 0x0062 0x0064 0x0061 0x0020 0x0078 0x002c 0x0079 0x003a 0x002d 0x007e 0x0079 0x0020 0x0069 0x0066 0x0020 0x006e 0x006f 0x0074 0x0020 0x0078 0x0020 0x0065 0x006c 0x0073 0x0065 0x005b 0x0079 0x003a 0x003d 0x0066 0x0028 0x007e 0x002d 0x0078 0x002c 0x0079 0x0029 0x0066 0x006f 0x0072 0x0020 0x005f 0x0020 0x0069 0x006e 0x0020 0x0072 0x0061 0x006e 0x0067 0x0065 0x0028 0x0079 0x0029 0x005d 0x005b 0x002d 0x0067 0x0028 0x0022 0x0001 0x0022 0x0029 0x005d 0x000a 0x0067 0x003d 0x006f 0x0072 0x0064 0x000a 0x0070 0x0072 0x0069 0x006e 0x0074 0x0028 0x0066 0x0028 0x0067 0x0028 0x0022 0x007f 0x0022 0x0029 0x002c 0x0067 0x0028 0x0022 0x07ff 0x0022 0x0029 0x0029 0x0029  Generated using a short and simple script I made. • 97 bytes Aug 23, 2023 at 15:56 # Swift 5.9, 93 chars, 96 bytes, $$\\frac{1.22333444 \times 10^{10,687,082,584}}{884,736}\$$ (I... can't be bothered to calculate that right now.) for i in.zero...UnicodeScalar("𐀀").value{print({String.init}()("\(i)",Int(i)),terminator:"")}  Ungolfed and commented: // UnicodeScalar("𐀀").value == UInt32(65536) for i in .zero...UnicodeScalar("𐀀").value { print( // {String.init}()(_:_:) is equivalent to String(repeating:count:) {String.init}()( "\(i)", // equivalent to String(describing: i) Int(i) // i is a UInt32, so we need to cast it ), terminator: "" // terminator is a newline by default, we don't want that ) }  It's possible to change the 𐀀 to the last valid Unicode character (U+10FFFF = 1114111), but I didn't bother because, quite frankly, it would take too long. Okay now do the fiddly thing. Just be prepared to wait all week. • scoring seems correct. Jul 23, 2023 at 7:48 • in terms of tetration, this is $10 ^^ 2.631333717740654$ Jul 23, 2023 at 7:56 • I don't know Swift, but could you use Int.max? Dec 25, 2023 at 22:09 • @noodleman I could, but that would be breaking the rule against integer constants greater than 10. Dec 25, 2023 at 23:16 • Ah, forgot about that one. Dec 26, 2023 at 1:45 # C++ - 101 bytes This runs for exactly 5 seconds - you can't see it, but I have the ASCII character for 5 in there: #include<iostream> #include<ctime> int main(){for(int n=time(NULL);time(NULL)<n+'';)std::cout<<n;}  I wouldn't know how large the number is - large enough that my computer wouldn't be able to calculate my score. I ran this program outputting the number into .txt file, and it produced a file of 16.585 MB. Screenshot of code in text document: • Rule 5 says that you can't use ^ or the equivalent library calls. Jan 9, 2014 at 2:54 • Oh dear, guess I'd better re-work it. – user10766 Jan 9, 2014 at 3:17 • @KyleKanos Fixed, is this better? – user10766 Jan 9, 2014 at 3:43 • Nope, it has several digits in the code. Jan 9, 2014 at 3:56 • @KyleKanos This better now? – user10766 Jan 9, 2014 at 4:06 # C, ??? (91 characters) main(int d,char**v){long c='\t'-'\b';for(;c;c++)for(d-=d;(*v)[d];d++)printf("%llu",(*v)[d]);}  If I could use ^, I'd write d^=d, but alas. Run through argv[0] and print its contents as an unsigned long long.Repeat 2long-1 times. Since argv[0] is the program's path, I'd assume the smallest possible value printed by this program (on Windows) would be A:\ .com with a 32 bit long. I'm not so sure on that though, smaller paths are probably possible. • You can as ^ is xor operator, not exponentiation. Dec 28, 2017 at 15:11 This is madness, to print the number it must be in the memory somehow, otherwise it would be considered as printing many separate numbers. I've written a JavaScript code and I've launched it in FireBug console. The largest result I've get with following code, on the quite strong workstation (8Core, 8GB RAM, haven't noted more details): The code: var e=Math.E,s=(e+'').replace('.',''),b=parseInt(s) try{for(var i=e;i<b;i+=i)s+=s}catch(e){} s  Code length: 94 characters (counted newlines as 1, you can replace them with semicolons and then it will be undoubtly 1). 94^3=830584. Test generated: '2718281828459045' repeated so many times, that the length of s was 1073741824 (over 1GB allocated). So the number is 2,7182*10^1073741824, and the points are: 3,27*10^1073741817 You can try to do that, but Firefox on my home laptop has crashed, so you need a really strong machine. But many people has written the snipplets, noone has reported to be able to run! So let's remove that try.. catch and analyse what theoretically could happen: The code: var e=Math.E,s=(e+'').replace('.',''),b=parseInt(s);for(var i=e;i<b;i+=i)s+=s;s  Code length: 79 characters, 79^3=493039 The code will make 50 iterations generating the string of the length of 18014398509481984. Please verify if it would be able to store on 64 bit machine, but because the string is duplicated, there could be a theoretical machine able to compress such items in memory. However, I have no idea if there is enough energy in solar system to display the whole number on any console... Anyway, we have number 2,7182*10^18014398509481984 divided by 79^3, so the poins are: 5,5*10^18014398509481977 Fill free to correct any mathematical errors, I've became a typical coding machine :D • In answer to your first statement: You can concatenate strings: this means that any sequence of adjacent digits will be considered as a single number; Jan 10, 2014 at 18:03 ## MATLAB ???/53^3 In matlab the maximum character size is defined and therefore this program will terminate eventually. Basically it starts like this: 9 (9)! ((9)!)! (((9)!)!)! ...  I have no clue how big the number is but this will be allowed to grow to a string with approximately 2^41-1 elements (on windows 64 bit). Some help in estimating the resulting number size would be appreciated. s=char('z'-'A') while true s=['(' s ')!'] vpa(s) end  • 1 is a digit, so is 2! Jan 15, 2014 at 10:02 • @Vereos Edit: Thanks I did not even notice, have found a way around them! Jan 15, 2014 at 10:12 • This doesn't mean that those solutions are valid indeed. If you look at the leaderboard, you'll see that no solution in there has digits in it. EDIT: Alright :) Jan 15, 2014 at 10:12 • The code at the bottom is an invalid program (non-terminating) and 9 is a digit. Nov 12, 2017 at 19:17 ## PHP (a lot)/83^3 Script should run for 99 seconds and produce as much 9's concatenated as it can. $n=strlen("alphabeta");ini_set('max_execution_time',intval($n.$n));while($n)echo$n;


Squeak Smalltalk cheat: > 2^^(2^30) / 71^3 chars

^((Float pi at:Float e)to:(Float e at:Float e))reduceRight:[:x :y|x<<y]


Little explanation:

• Internal bit representation of a Float can be accessed as a pair of 32 bit BigEndian words (a cheat)
• #at: is tolerant and retries its parameter #asInteger (oh, not nice!)
• << is left shift (a perfect cheat)
• evaluate this expression via 'print it' menu, and the resulted number is printed in base 10

With characters left, I could also use significandAsInteger, but these are big enough yet. How big?

• (Float pi at:Float e) -> 1413754136 > 2^31
• (Float e at:Float e) -> 2333366121 > 2^31
• ((Float pi at:Float e)to:(Float e at:Float e)) size -> 919611986>2^30

The first iteration is greater than 2^31*2^(2^31) > 2^^5
The second iteration is greater than 2^31*2^(2^^5) > 2^^6
...
The 2^30th iteration is greater than 2^^(2^30)

I let readers do the conversion to base 10, That kind of number gives me some vertigos...

Since this number is represented in memory, then converted to decimal by way of multiplications and divisions, let's say it's highly hypothetical...
Anyway, the technique consisting in storing the number in memory (base 2) then print, especially in Squeak is completely disqualified...
Creating a very small number is fast:
[1<<15000000] timeToRun -> 4 (milliseconds)
But LargeInteger package is not based on gmp and rapidly inefficient for base 10 conversion (naive * and /)
Even if I install a karatsuba multiplication, it takes quite long to print on my mac mini:
[1<<15000000 printOn: NullStream new] bench -> '2,700 seconds.'

A more reasonable loop in 32-bit memory:

What I can really execute is the first loop (let's omit the -1 on first term):

[((Float e at:Float e)<<(Float e at:Float e))] timeToRun -> 8732 (milliseconds)

As said above, I can 'do it' but I can't 'print it' in reasonable time with Squeak, though I can manipulate it, like having a guess of number of decimal digits:

((((Float e at:Float e)<<(Float e at:Float e)) highBit - 1) * 1233 >> 12) + 1-> 702402458, or log: 10 -> 10^(10^8.8)

# C, undetermined (infinite?) output length / 62^3 67^3

l(){printf("%o",rand())-!!l&&l();}main(){srand(time(!l));l();}


l(){for(;printf("%o",rand())-!!l;l());}main(){srand(time(!l));l();}


I'd written this a few days prior, but was having a hard time figuring out the expected average length of the output. The program (given enough stack and time) eventually will terminate.

Was going to post when I figured the output length, but since Nate Eldridge's is similar, posting it now.

Originally had !'!' instead of !l; borrowed that part from Nate's answer.

I also had a similar version without srand, at 42 48 characters:

main(){printf("%o",rand())-!!'!'&&main();}


main(){for(;printf("%o",rand())-!!'!';main());}


Mine terminate (on average) earlier, compared to Nate's (10/RAND_MAX chance of popping up the stack instead of 1/RAND_MAX), but output more digits per iteration (~10.43 vs 1).

Edit: original actually terminated after RAND_MAX/20 iterations on average. Golfed too far.

Edit2: not enough rep to comment. Golfed Nate's entries below mine (64 and 44):

w(){for(printf("%o",w);rand();w());}main(){srand(time(!w));w();}


main(){for(printf("%o",'I');rand();main());}


# Mathematica, 1.08544407066*10^23496 ≈ 10↑↑2.640580269

N[Cosh[Cosh[Cosh[Pi]]]]


It applies the hyperbolic cosine function to pi 3 times. If I had applied it 4 times, it would've caused an overflow error.

• Overflow error should not be a problem here. May 12, 2017 at 11:53
• N[Cosh[Cosh[Cosh[Cosh[Cosh[Cosh[Cosh[Cosh[Cosh[Cosh[Pi]]]]]]]]]]]. Dec 28, 2017 at 15:15

# R, 63 characters of code, 4.036242e+3699695 ≈ 10↑↑2.81744412

set.seed(T)
paste(rep(RS<-abs(.Random.seed),RS[exp(T)]),collapse="")
# the result will be 3699696 digits long
# 624 repetitions of 4036241692704834420106146035583972223....


... or you can have it printing for as long as you have time:

set.seed(T)
repeat{cat(abs(.Random.seed),sep="")}


# Lua, Unknown/99^3 ≈ 10↑↑2.945956159

With infinite runtime:

m=math;p=m.pi;t=m.floor(p)s=tostring;h=t+s(p):sub(t)j=h;while(j>t)do io.write(s(h):rep(h))j=j-t;end


< 5 seconds:

m=math;p=m.pi;t=m.ceil(p)s=tostring;h=t+s(p):sub(-t)j=h;while(j>t)do io.write(s(h):rep(h))j=j-t;end


Ungolfed:

t=math.ceil(math.pi)                -- Acquire the number 4
h=t+tostring(math.pi):sub(-t)       -- Get the last t(4) digits of pi(5898) as a string.
-- Adding t auto converts it to a number and increases our number
j=h;                                -- Set j as a counter to loop
while(j>t)do
io.write(tostring(h):rep(h))    -- Add h(5902) repitions of h as a string to the output
j=j-t;                          -- Decrement j by t(4), my only number available
end


## Extra

Lua's lack of mathematical constants (other than pi) and ++ or -- operators made it tricky to manipulate numbers, but I thought I made good work with what I have. string.rep is the real hero.

If there's a notation that exists to write my score, I'll include it, but I don't know of one. If I was thinking correctly, the < 5 code's number should be (5902 repeated 5902 times) repeated ~5902/4 times.

• Hello! What does this program do? May 10, 2016 at 23:26
• @NoOneIsHere Added ungolfed code with explanation. That should help.
– Blab
May 11, 2016 at 0:51
• If your last line is correct, your number should be ≈10^174,000,000 May 13, 2017 at 21:31

# Javascript, > 10316469 ≈ 10↑↑2.740388839

(Run from the browser console to get output)

for(a="",b="￭".charCodeAt;b--;)a+=(''+b).repeat("￭".charCodeAt);a


# Python 3, 99 bytes, score not sure

x,e,a=ord("~"),eval,"f(~-n)"
f=lambda n:x if n<x-(x<<x)else f(~-e("<<".join("a"*e(a))))
print(f(x))


Try it online!

• Pretty certain you just have infinite recursion here, your f(n) calls f(...) for values much greater than n. May 23, 2022 at 21:17

# Python, $$\\approx 10 \uparrow \uparrow 11.20322\$$

l=lambda n:-~(n<<n)

Pretty tame. Obviously, $$\l(n) = 2^n n+1\$$.

Now, we'll combine more left shifting with recursion:

m=lambda n:-~(n<<n<<l(l(n)))

Now, running the calculations, $$\m(n) = 2^{2^{2^n n+1} (2^n n+1)+1} 2^n n\$$.

Another layer of shifting:

o=lambda n:n<<n<<n<<m(m(m(n)))

This is getting unwieldy! MathJax won't even render the formula! My final code returns $$\o(126)\$$. It is the following:

l=lambda n:-~(n<<n)
m=lambda n:-~(n<<n<<l(l(n)))
o=lambda n:n<<n<<n<<m(m(m(n)))
print(o(ord("~")))

• One of the restrictions is to not use digits (e.g. 0 and 1) in your code. There are various workarounds to this e.g. using len("abc") or ord(unicode_character). May 23, 2022 at 20:43
• Oh. I thought it meant decimal, but I'll fix it. May 24, 2022 at 14:41
• For sufficiently large $x$, $m(10\uparrow\uparrow x)\approx10\uparrow\uparrow(x+3)$. The extra << m(...) adds on one more power of $10$, and some work with the base case gives $l(l(126))\approx10^{10^{10^{10^{0.20322}}}}=10\uparrow\uparrow4.20322$, which altogether gives $10\uparrow\uparrow12.20322$. May 25, 2022 at 1:28
• Oh, really? Hypercalc gave me 10^^8, but even better then! May 27, 2022 at 6:28
• I have no idea how hypercalc handles arithmetic underneath, but I just used full machine precision and some exponential rules to work your stuff out. I added an implementation you can try out at the bottom of the question, though you'll have to change x << y to x * 2 ** y or add __lshift__ and __rshift__ methods. May 29, 2022 at 19:17

# Python 3, 99 bytes, score $$\ \approx 10 \uparrow\uparrow 4.74238\$$

a=ord("􏿿")
for i in[a]*(a<<a):print(end=str(eval(f"{a}<<{str(eval('<<'.join('a'*(a<<a))))}"*a)))


Try it online!

## Pxem, 99 bytes, score: $$\\approx2.63\times10^{22183}=10\uparrow\uparrow2.63809\$$.

Unprintables are escaped.

.z\377.n\001.+.c\377\377.+\377.+\377.+\377.+\377.+\377.+\377.+\377.+\377.+\377.+\377.+\377.+\377.+\377.+\377.+\377.+\377.+\377.+\377.+\377.+\377.+\377.+\377.+\377.+\377.+\377.+\377.+\377.+.a.n


I think it could be more, with x-ple loops.

Output: $$\(255\sum_{k=0}^{7394}{1000^k})\times10000+7395\$$ (I think)

Try it online!

• Also I need to re-improve my interpreter so that it outputs faster, like before.
– user100411
Jun 3, 2021 at 11:54
• "You cannot use digits in your code (0123456789);" >_> Jun 3, 2021 at 13:53
• @simplybeautifulart Actual source: .zÿ.n.+.cÿÿ.+ÿ.+ÿ.+ÿ.+ÿ.+ÿ.+ÿ.+ÿ.+ÿ.+ÿ.+ÿ.+ÿ.+ÿ.+ÿ.+ÿ.+ÿ.+ÿ.+ÿ.+ÿ.+ÿ.+ÿ.+ÿ.+ÿ.+ÿ.+ÿ.+ÿ.+ÿ.+ÿ.+.a.n; see, no digits can be seen. Also this was obtained when I exported LC_ALL=C.
– user100411
Jun 3, 2021 at 15:11
• Also I obtained on TIO, where UTF-8 is default.
– user100411
Jun 8, 2021 at 12:02

# Python 3, score $$\ \approx 10 \uparrow\uparrow 23.98622 \$$

from math import *
x=pi;e=exp
for i in range(int(e(x))):x=e(x)
x=int(x)
print(str(x)*x)


## Explanation

1. Initialize x as pi.
2. Repeat 23 times (int(e(x)) = 23): x = e(x).

This ends up as e^(e^(e^(...e^pi...))), with 23 "e^"s.

1. Round down.
2. Convert it to a string and repeat that string x times. I have no idea how much larger this makes the number, but it is much larger.

Sorry, I really have no idea how large this number is (even with up-arrow notation) or how to calculate that. :/ Mostly this answer was just to see what I could do. :)

• Using the program linked at the end of the question, you can estimate your score as 10 ^^ 23.98622, where e(x) is taken as math.e ** x and str(x) * x is approximately x ** x. Jun 18, 2022 at 0:40
• Oh thanks! Sorry I didn't notice that link. Jun 21, 2022 at 11:48

# Python, at least $$\10\uparrow\uparrow13\$$ or $$\10\uparrow\uparrow\uparrow 2\$$

f=lambda x:''.join(str(x)for y in range(int(x)))
print(f(f(f(f(f(f(f(f(f(f(f(f(ord(""))))))))))))))


Unprintable character in ord function is 0x7f.

Try it online!

• Isn't that function body just equivalent to str(x)*int(x)?
– Jo King
Aug 17, 2023 at 11:37
• @JoKing yes but I can't use multiplication. Aug 17, 2023 at 11:37
• right, i suppose that would apply to string multiplication as well
– Jo King
Aug 17, 2023 at 11:39