Quantcast
Channel: User Peter - Reinstate Monica - Stack Overflow
Viewing all articles
Browse latest Browse all 239

Comment by Peter - Reinstate Monica on what is a good way to change unsigned minus unsigned to be signed?

$
0
0
@PeteBecker Incidentally, it is actually the division and multiplication causing the problem here, plus the conversion to double, paradoxically. Only adding and subtracting in two's complement would yield the same bit patterns whether performed signed or unsigned, so that converting the result to an int (not to a float) would yield the "expected" result.

Viewing all articles
Browse latest Browse all 239

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>