01-12-2026 10:52 AM
Hmmm
I'm confused. Supposedly, if you interpret the 64 bits of a double FP as a 64-bit signed integer, it will sort correctly.
But I observe this:
What am I missing?
01-12-2026 11:21 AM
I haven't studies it in detail, but it might have to do with the fact that negative integers are in Two's complement.
01-12-2026 12:56 PM
In both Double, and I64, the MSB is 1 for negative, 0 for positive.
01-12-2026 05:46 PM - edited 01-12-2026 07:00 PM
I was talking about the remaining bits, which are in two-s complement for negative numbers.
For example in l8,
1 = b00000001
-1 = b11111111 (i.e. not b10000001)