zlacker

[return to "The largest number representable in 64 bits"]
1. matja+5c6[view] [source] 2023-11-27 20:54:05
>>tromp+(OP)
IEEE754 64-bit representation already has infinity:

    uint64_t x = 0x7ff0000000000000ULL;
    printf("%f\n", *(double *)&x);
output:

    inf
But you could use a representation where 0 is 0, and 1 is infinity, saving 63 bits...
◧◩
2. toxik+bh6[view] [source] 2023-11-27 21:17:04
>>matja+5c6
Fair, but also an uninteresting answer.
◧◩◪
3. pphysc+Zm6[view] [source] 2023-11-27 21:40:58
>>toxik+bh6
It's about as interesting as the other answers proposed in TFA, and it gets to the meat of it: they are all just representations invented by people, and there's nothing stopping us from inventing our own representations that fit into 64 bits (or 1 bit).
◧◩◪◨
4. toxik+Zs6[view] [source] 2023-11-27 22:12:55
>>pphysc+Zm6
No, it doesn’t. The question is “what is the largest non-trivial number you can represent with some constraint on size of its expression”. It’s a really old question, and saying “infinity” as an answer misses the point. Saying you can invent an arbitrary number system also misses the point by simply not answering. If you need to spend a bunch of bytes explaining your new system, did you really use 8 bytes?

It just feels really bad faith.

[go to top]