The largest number representable in 64 bits

tromp.github.io

102 points by tromp 15 hours ago


nivertech - 2 hours ago

The correct answer is:

the largest number representable in 1 bit is any number (including +infinity and beyond).

This article describing various Rube Goldberg machines, there is no need to agree on different ways of representing numbers when one can set a single bit to 1 to represent any desired pre-defined number, or 0 to represent its absence (or the number 0).

abcde666777 - 10 hours ago

Hi guys, I've come up with a new 64 bit number representation where 0xFFFFFFFF is infinity. Hell you know what every value is just infinity.

cortesoft - 14 hours ago

This feels like the computer science version of this article: https://www.scottaaronson.com/writings/bignumbers.html

gegtik - 13 hours ago

I can do you one better. I can represent the largest number with a single binary bit.

drob518 - 7 hours ago

In a sense, this is just an exercise in (possibly lossy) compression. 64-bit unsigned into are not lossy. 64-bit floating point is lossy but has larger range; it’s only able to encode a small fraction of the numbers in its range (in the limit, the fraction that can be represented is zero since there are infinite real numbers in the range and FP only captures a few).

rurban - 3 hours ago

I win: 0x7FF0000000000000

Proof: There is no larger number than +∞. Is +∞ a number? Yes, it is. It is not a real number, it is not a representative number, it's a hyperreal number. (Kreisler 1986)

librecell - 6 hours ago

i take so much for granted.

every time i’m hacking around with no idea what the program might be, i really should be working on a “thank you, world!” program,

to cultivate gratitude and humility

all those whose work has made it such that i can say “hellos commonlisp what is the most positive fixnum or word or whatever!” or totally not even think about that let alone complex allocations that seem to happen automatically relative to me

they’re cool as f**! i should do well not to forget this.

thank you for sharing

leodavi - 8 hours ago

To the author: this work you've published rests on some background knowledge that I'm familiar with but also a lot of background knowledge that's foreign to me. For the parts I was able to follow, I thought the mental gear-turning was enjoyable and interesting! But pursuing these intersections between algebra and computer science is often not so interesting, at least, when I research it myself. Is this something you've learned in university? I ask because I fear that without a formal learning environment, I may never pick up on the more advanced logic halfway through the article. Anyway, cheers to the good work.

its-summertime - 13 hours ago

It all goes over my head, but, what does the distribution of values look like? e.g. for unsigned integers its completely flat, for floating point its far too many zeros, and most of the numbers are centered around 0, what do these systems end up looking like?

dang - 11 hours ago

Related. Others?

The largest number representable in 64 bits - https://news.ycombinator.com/item?id=38414303 - Nov 2023 (105 comments)

The largest number representable in 64 bits - https://news.ycombinator.com/item?id=35677148 - April 2023 (42 comments)

(I haven't put 2023 in the current title since the article says it's been significantly expanded since then.)

heyitsdaad - 14 hours ago

bits == entropy.

Everything else is word play.

tromp - 12 hours ago

Please no more comments to the extent of "i can define a much larger number in only 1 bit". What makes my blog post (hopefully) interesting is that I consider tiny programs for computing huge numbers in non-cheating languages, that are not specifically equipped for doing so.

kstrauser - 14 hours ago

What's the biggest up-arrow notation number you can spell with 64 bits?

https://mathworld.wolfram.com/KnuthUp-ArrowNotation.html

bmacho - 13 hours ago

Can you give a formulation of the problem you are trying to answer?

xelxebar - 7 hours ago

Busy Beaver gets a lot of love, but the fast growing hierarchy is both constructive and can go way, way, waaaaay beyond current known BB bounds. This makes their size much more viscerally apparent than gesturing vaguely at BB(BB(BB(100))) or whatever, IMHO.

David Metzler has this really cool playlist "Ridiculously Huge Numbers" that digs into the details in an accessible way:

https://www.youtube.com/playlist?list=PL3A50BB9C34AB36B3

By the end, you're thinking about functions that grow so fast TREE is utterly insignificant. Surprisingly, getting there just needs a small bit of machinery beyond Peano Arithmetic [0].

Then you can ponder doing all that but making a tiny tweak by replacing succesorship with BB. Holy cow...

[0]:https://en.wikipedia.org/wiki/Theories_of_iterated_inductive...

- 12 hours ago
[deleted]
anthk - 9 hours ago

You can do that Ackermann number with zenlisp with no internal numbers at all, just lists.

dooglius - 13 hours ago

I'm going to agree with the downvoted people and say that this sort of approach is largely meaningless if you allow arbitrary mappings. IMO the most reasonable mathematical formulation given the structure of the integers (in the sense of e.g. Peano) is that to truly represent an integer you have to represent zero and each other representable number has a representable predecessor, i.e. to say you can represent 5 you need 0,1,2,3,4, and 5 to be representable. By a straightforward counting argument, 2^64-1 is then the largest representable number, in other words the obvious thing is right.

dmitrygr - 13 hours ago

Given time, this will output a bigger number, and it is only 48 bits:

   B0 39      mov al,'9'     //load character '9' to AL
   CD 29      int 29h        //print to screen
   EB FA      jmp short -6   //go again
IshKebab - 14 hours ago

Once you allow any format the question is completely meaningless. You can just define 0 to mean any number you want.

Sharlin - 14 hours ago

(Edit: oops, incorrect numbers)

masfuerte - 14 hours ago

> The largest number (currently known to be) representable in 64 bits is w218

In my representation the bit pattern 00000000_00000000_00000000_00000000_00000000_00000000_00000000_00000001 stands for the number w218+1.

I win!

o_nate - 13 hours ago

Whatever largest number you can express in your system, I can represent a larger one in only one bit, using the following specification.

0=your largest number 1=your largest number + 1