LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sorting a Table

Solved!
Go to solution

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:

paul_a_cardinale_0-1768236660478.png

paul_a_cardinale_1-1768236693178.png

What am I missing?

 

 

0 Kudos
Message 31 of 34
(55 Views)

I haven't studies it in detail, but it might have to do with the fact that negative integers are in Two's complement.

0 Kudos
Message 32 of 34
(47 Views)

In both Double, and I64, the MSB is 1 for negative, 0 for positive.

0 Kudos
Message 33 of 34
(35 Views)

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)

0 Kudos
Message 34 of 34
(15 Views)