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)
01-14-2026 05:25 PM
@altenbach wrote:
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)
Sure. But I believed (and have read) that interpreting an (IEEE 754) floating point number as a (two's complement) signed integer would result in the same ordering as interpreting the floating point value.
01-14-2026 06:02 PM
OK, I'll take another stab at this. I fixed the numeric sorting, and added a new mode (Hierarchal).
It occurred to me that there may be a need to sort things such as paragraph identifiers that typically use hierarchal numbering: "1.1" < "1.10".
However instead of using a "Mode" input, I made a polymorphic VI.