Largest Number Printable

Windows 2000 - Windows 8 (3907172 / 23³ = 321)

NOTE: DON'T F'ING RUN THIS!

Save the following to a batch file and run it as Administrator.

CD|Format D:/FS:FAT/V/Q

Output when run on a 4TB drive with the first printed number in bold.

Insert new disk for drive D:
and press ENTER when ready... The type of the file system is NTFS.
The new file system is FAT.
QuickFormatting 3907172M
The volume is too big for FAT16/12.


GolfScript, score: way too much

OK, how big a number can we print in a few chars of GolfScript?

Let's start with the following code (thanks, Ben!), which prints 126:

'~'(

Next, let's repeat it 126 times, giving us a number equal to about 1.26126 × 10377:

'~'(.`*

(That's string repetition, not multiplication, so it should be OK under the rules.)

Now, let's repeat that 378-digit number a little over 10377 times:

'~'(.`*.~*

You'll never actually see this program finish, since it tries to compute a number with about 10380 ≈ 21140 digits. No computer ever built could store a number that big, nor could such a computer ever be built using known physics; the number of atoms in the observable universe is estimated to be about 1080, so even if we could somehow use all the matter in the universe to store this huge number, we'd still somehow have to cram about 10380 / 1080 = 10300 digits into each atom!

But let's assume that we have God's own GolfScript interpreter, capable of running such a calculation, and that we're still not satisfied. OK, let's do that again!

'~'(.`*.~*.~*

The output of this program, if it could complete, would have about 1010383 digits, and so would equal approximately 101010383.

But wait! That program is getting kind of repetitive... why don't we turn it into a loop?

'~'(.`*.{.~*}*

Here, the loop body gets run about 10377 times, giving us a theoretical output consisting of about 1010⋰10377 digits or so, where the tower of iterated powers of 10 is about 10377 steps long. (Actually, that's a gross underestimate, since I'm neglecting the fact that the number being repeated also gets longer every time, but relatively speaking that's a minor issue.)

But we're not done yet. Let's add another loop!

'~'(.`*.{.{.~*}*}*

To even properly write down an approximation of such numbers requires esoteric mathematical notation. For example, in Knuth up-arrow notation, the number (theoretically) output by the program above should be about 10 ↑3 10377, give or take a few (or 10377) powers of ten, assuming I did the math right.

Numbers like this get way beyond just "incredibly huge", and into the realm of "inconceivable". As in, not only is it impossible to count up to or to write down such numbers (we crossed beyond that point already at the third example above), but they literally have no conceivable use or existence outside abstract mathematics. We can prove, from the axioms of mathematics, that such numbers exist, just like we can prove from the GolfScript specification that program above would compute them, if the limits of reality and available storage space did not intervene), but there's literally nothing in the physical universe that we could use them to count or measure in any sense.

Still, mathematicians do sometimes make use of even larger numbers. (Theoretically) computing numbers that large takes a little bit more work — instead of just nesting more loops one by one, we need to use recursion to telescope the depth of the nested loops. Still, in principle, it should be possible to write a short GolfScript program (well under 100 bytes, I would expect) to (theoretically) compute any number expressible in, say, Conway chained arrow notation; the details are left as an exercise. ;-)


JavaScript 44 chars

This may seem a little cheaty:

alert((Math.PI+''+Math.E).replace(/\./g,""))

Score = 31415926535897932718281828459045 / 44^3 ≈ 3.688007904758867e+26 ≈ 10↑↑2.1536134004