0

In this post below 64 bit addition is achieved on a 32 bit machine. However it is using unsigned values for its overflow detection and i'm currently limited to only signed values. Is the post below possible with signed values?

https://stackoverflow.com/a/1652673/6947289

Detecting signed overflow in C/C++ Explains how to check if a int has overflowed. The same comparison does not work when used on the left and right side of the 64 bit value when doing the 32 bit addition.

Community
  • 1
  • 1
  • http://stackoverflow.com/questions/199333/how-to-detect-integer-overflow-in-c-c, http://stackoverflow.com/questions/3944505/detecting-signed-overflow-in-c-c, http://stackoverflow.com/questions/15920639/how-to-check-if-ab-exceed-long-long-both-a-and-b-is-long-long – Cody Gray - on strike Dec 17 '16 at 14:49
  • I'm sorry, I don't understand your explanation for why those answers don't work for you. They have code to check if an addition of two integers will overflow, which is *precisely* what you're asking here. – Cody Gray - on strike Dec 18 '16 at 10:59

0 Answers0