1
QB64 Discussion / _SHR bug with sign bit of _UNSIGNED _INTEGER64
« on: December 03, 2019, 06:20:30 pm »
Hello,
I use qb64 to test some algorithms on integers when i got a strange garbage.
So, i try :
both display result as :
100000000000000
8000000000000000
FF00000000000000
I think _SHR is not shifting but expanding the "sign" bit to the right.
The last print is the negative of the first.
Is it a solution ?
Thanks.
I use qb64 to test some algorithms on integers when i got a strange garbage.
So, i try :
Code: QB64: [Select]
- n = &H0100000000000000
- m~&& = &H0100000000000000
both display result as :
100000000000000
8000000000000000
FF00000000000000
I think _SHR is not shifting but expanding the "sign" bit to the right.
The last print is the negative of the first.
Is it a solution ?
Thanks.