HAKMEM ITEM 174 (Gosper, Nelson)
(1 of 4) The question:
Try posing it to your favorite LLM, perhaps like this:
This is a question about computer programming and internal computer representation of numbers: how to find a positive number whose 64-bit IEEE 754 floating-point representation has the same bits as its representation as a 64-bit machine integer?
(2 of 4) The number:
Quite easy to find it with a computer program (as opposed to proving uniqueness, which doesn't seem quite trivial, though it doesn't seem hard, either).
On little-endian x86_64, the 64-bit integer value is 4886674138783273204 (for 32 bits, 1318926965).
(With the relevant facets of the PDP-10 36-bit floating-point format mimicked by a simple throwaway program, the HAKMEM result is of course easily reproduced as well.)
NB: for the purpose of demonstrating uniqueness, 64 bits are out of the reach of brute force. I haven't calculated whether brute force would have worked on the PDP-10.
_________
This item is included in the HAKMEM sample in the Jargon File: <http://www.catb.org/jargon/html/H/HAKMEM.html>.
See also a HAKMEM facsimile e.g. at <https://w3.pppl.gov/~hammett/work/2009/AIM-239-ocr.pdf>.
(3 of 4) An LLM's answer:
Google's product, for example, apparently "understood" the problem, because its response included:
The Goal:
We want to find a positive number that, when represented in both formats, results in the same bit pattern. This means the exponent and mantissa in the floating-point representation must be such that they effectively "mirror" the integer representation.
But I couldn't make heads or tails of the approach presented after that, which did not seem to provide an adequate answer; I reproduce here just the last line:
...
Number = (2^52 - 1) * 2^63
Needless to clarify: this is the 115-bit number 41538374868278611804871933778984960 (hexadecimal 7FFFFFFFFFFFF8000000000000000) and when it is represented as a 64-bit floating-point number, its bits are 5125096375947624446, i.e. this number is most definitely not the solution.
_________
(I guess a full solution or analysis has not been published on the Internet; I found, for example, an incorrect claim that such a number does not exist in 32 bits.)
(4 of 4) General remark:
I am inclined to believe the claims that today's LLMs have reached the limits of their capabilities (but not the limits of their usefulness, of course).
Naturally, the billion-dollar questions are what the next breakthrough will be, when, and whether there will be another AI winter before that.
No comments:
Post a Comment