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 ≤ b < 1\$$, then $$\a↑↑b = a^b\$$.

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

If $$\b < 0\$$, then $$\a↑↑b = \log_a(a↑↑(b+1))\$$

• 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
• Say, if my program prints 500b, is this invalid? That is, may we ignore all non-numeric things a program prints? And if so, would something like 50r7 count as 507? May 22, 2017 at 20:07

Javascript, more than 10^(16*2^2718281828459046) / 54^3 ≈ 10↑↑3.069506124

for(a=b=(Math.E+'').replace(".","");a--;b+=b);alert(b)


Description:

• (Math.E+'') is "2.718281828459045"
• The dot is dropped, a and b are "2718281828459045"
• Loop executes 2718281828459045+1 = 2718281828459046 times
• On every iteration b (and its length) is doubled (initial is 16 digits long)
• Outputs value 2718281828459045 repeated 2718281828459046 times
• You're score would be 2718281828459045*2718281828459046, no? May 18, 2017 at 18:49
• @tuskiomi, in b+=b i'm concatenating string from b with itself, so its length doubles. May 18, 2017 at 19:07
• So the above number times 2. May 18, 2017 at 19:10
• @tuskiomi, nope, the output is concatenated string, not its length. And that's not addition, that's concatenation. Try following program for(a=4,b=(Math.E+'').replace(".","");a--;b+=b)console.log(b);console.log(b) - it makes only 4 steps instead of 2718281828459045 and outputs b to the console on each step and the last value that is alerted in original code. May 18, 2017 at 19:35
• @tuskiomi, only with 4 iterations value becomes 2718281828459045271828182845904527182818284590452718281828459045271828182845904527182818284590452718281828459045271828182845904527182818284590452718281828459045271828182845904527182818284590452718281828459045271828182845904527182818284590452718281828459045 that is definitely larger than 2718281828459045*2718281828459046 = 7389056098930651665961070771070 :) May 18, 2017 at 19:38

Python 3.3, 60 bytes, score ≈ 103692 ≈ 10↑↑1.55233497

''.join([str(ord(y)) for x in dir(__builtins__) for y in x])


This prints (the string) (3697 digits) : 6511410511610410910111610599691141141111146511511510111411610511111069114114111114651161161141059811711610169114114111114669711510169120991011121161051111106610811199107105110103737969114114111114661141111071011108010511210169114114111114661171021021011146911411411111466121116101115879711411010511010367104105108100801141119910111511569114114111114671111101101019911610511111065981111141161011006911411411111467111110110101991161051111106911411411111467111110110101991161051111108210110211711510110069114114111114671111101101019911610511111082101115101116691141141111146810111211410199971161051111108797114110105110103697970691141141111146910810810511211510511569110118105114111110109101110116691141141111146912099101112116105111110709710811510170105108101691201051151161156911411411111470105108101781111167011111711010069114114111114701081119711610511010380111105110116691141141111147011711611711410187971141101051101037110111010111497116111114691201051167379691141141111147310911211111411669114114111114731091121111141168797114110105110103731101001011101169711610511111069114114111114731101001011206911411411111473110116101114114117112116101100691141141111147311565681051141019911611111412169114114111114751011216911411411111475101121981119711410073110116101114114117112116761111111071171126911411411111477101109111114121691141141111147897109101691141141111147811111010178111116656810511410199116111114121691141141111147811111673109112108101109101110116101100781111167310911210810110910111011610110069114114111114798369114114111114791181011141021081111196911411411111480101110100105110103681011121141019997116105111110879711411010511010380101114109105115115105111110691141141111148011411199101115115761111111071171126911411411111482101102101114101110991016911411411111482101115111117114991018797114110105110103821171101161051091016911411411111482117110116105109101879711411010511010383116111112731161011149711610511111083121110116971206911411411111483121110116971208797114110105110103831211151161011096911411411111483121115116101109691201051168497986911411411111484105109101111117116691141141111148411411710184121112101691141141111148511098111117110100761119997108691141141111148511010599111100101681019911110010169114114111114851101059911110010169110991111001016911411411111485110105991111001016911411411111485110105991111001018411497110115108971161016911411411111485110105991111001018797114110105110103851151011148797114110105110103869710811710169114114111114879711411010511010387105110100111119115691141141111149010111411168105118105115105111110691141141111149595981171051081009599108971151159595959510010198117103959595951001119995959595105109112111114116959595951109710910195959595112979910797103101959597981159710810897110121971159910510598105110981111111089812111610197114114971219812111610111599971081089798108101991041149910897115115109101116104111100991111091121051081019911110911210810112010010110897116116114100105991161001051141001051181091111001011101171091011149711610110111897108101120101991021051081161011141021081119711610211111410997116102114111122101110115101116103101116971161161141031081119897108115104971159711611611410497115104104101120105100105110112117116105110116105115105110115116971109910110511511511798991089711511510511610111410810111010810511511610811199971081151099711210997120109101109111114121118105101119109105110110101120116111981061019911611199116111112101110111114100112111119112114105110116112114111112101114116121114971101031011141011121141141011181011141151011001141111171101001151011161151011169711611611411510810599101115111114116101100115116971161059910910111610411110011511611411511710911511711210111411611711210810111612111210111897114115122105112

EDIT, 100 chars, score = 0 for using numbers in code :( Need to find a way to multiply the the strings without numbers.

''.join([str(ord(y)) for x in dir(__builtins__) for y in x])*999999999999999999999999999999999999999


Repeating the string until char limit to get a 3.697e+042 digit number, for 100 chars

• Last time I checked 9999999... was a number :P Jan 13, 2014 at 12:37
• This isn't a full program, just a REPL script. Mar 26, 2016 at 20:36

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 JavaScript (Node.js), 99 bytes, score = 1.62e218103802 (approx.) d=Date.now();r=(a,n)=>{for(i=n;i--;){a=a+a+a+a}return a};console.log(r(""+d,"complication".length)) Takes the current date as an integer (13 digits), and for 12 iterations ("complication".length), joins 4 copies of itself. The program actually runs on my machine, unlike many googological answers, but will take a long time to print the entire 218103808-digit number... • I think using Date.now() violates the rule "You can use mathematical/physical/etc. constants, but only if they are less than 10". Also, though not exactly stated, I don't think an answer whose score depends on the current time is valid here. May 24, 2021 at 1:27 TI-Basic, $$\7.37 \times 10^{127} / 56^3 \approx 10 \uparrow\uparrow 3.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 Java (JDK) v0.0.1: $$\6.3\times 10^{72^{5}}/96^3\approx10\uparrow\uparrow3.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 4.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 • Thanks a lot!!! – 0xff Oct 23, 2021 at 7:52 Mathematica, 10↑↑3.32019810↑↑3.869893 1010485761048576*210485762 ≈ 10↑↑6.0258976 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 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, score not sure 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 Nim, Unsure 963177.7159203645 (thanks to @grandBagel) for i in 1..100000000000:stdout.write i,i,i,i,i  • Your score is 963177.7159203645 Jan 12 at 19:25 Python 3, 95 bytes, score at least 10000 a=ord("~") g="a<<" c=eval(g+"a<<"+"<<".join("a"*a)) b=len(str(c)) print(eval("<<".join("b"*a)))  Try it online! 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());}


TURKEY BOMB

PUDDING


Score - Infinitely large number (as large as your system will store) / 73

Similarly, this one will limit the size to the size of your computer, up to infinity and into unknowable values:

HYBRID OBTAINED BY COMBINING PUDDING & NOMENCLATURE [WITH GUSTO]

• PUDDING is >10 Jan 16, 2014 at 1:48
• PUDDING is infinitely large. Jan 16, 2014 at 11:46
• WTF did I just read? Jan 20, 2014 at 0:47
• @GeorgeReith "an almanac of black magic of some sort, with the cryptic title "Communications of the ACM,"" Jan 20, 2014 at 0:51
• This language is unimplemented and therefore not a valid answer per current site rules. Dec 1, 2018 at 1:59

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


Python2

o=oct(ord('~'))
for a in range(int(o)):
o+=o*int(o)
for b in range(int(o)):
o+=o*int(o)
o*int(o)


This is exactly 100 characters if the indentations are tabs.

In order for the program to output, it needs to be run in a python console rather than in a file.

Score is unknown at this point because the inner for loop will run 10e707 times in the first iteration of the outer loop. and in total, there will be 176 iterations of the outer loop. Also, this output is too big for me to even comprehend how to mark the notation for it.

• Unnecessary spacing removed, there may be integer multiplication involved, there is nothing printed unless that's what the last line does, and the value of o*int(o) at the end should be approximately 10↑↑↑↑176. May 18, 2019 at 19:30
• For a small optimization, the third line should be moved up so that the outer loop runs more times. May 18, 2019 at 19:37

Pxem, filename: 99 bytes, output: $$\(255\sum_{k=0}^{7394}{1000^k})\times10000+7395\$$ (I think), score: $$\\approx2.63\times10^{22183}\$$.

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.

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, 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!

Python 2, 100 bytes

n=ord("~")
f=lambda x:reduce(lambda a,b:-~a<<f(~-x)<<b,range(-~x<<x<<x<<x<<x<<x<<x))if x else n
f(n)


Try it online!

Python 3, 99 bytes

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


Try it online!