math,overflow,guava,integer-arithmetic,underflow

As GregS wrote, If a and b are of opposite signs(*) then addition of them cannot possibly overflow. Now, if they're of the same sign, the sign of the result must be the same if there's mo overflow. (*) With zero and positive treated the same, which doesn't matter and...

binary,overflow,addition,twos-complement,underflow

It seems like whenever you have 3 carries in a row, it drops a 1. Same with the next one, 15 + 7. It isn't doing the carry correctly. 11 <- carry 0011 = 3 +0111 = 7 1010 = 10 ...

Typically, you get trouble when adding very large and very small values, because this can lead to a high relative error. Get rid of this summation (1+exp(x)), it quickly runs out of the range of double values when x is large. log(1+exp(x)) log(1+1/exp(x))*exp(x)) log(1+1/exp(x))+log(exp(x)) log(1+1/exp(x))+x An alternative is the use...

floating-point,ieee-754,underflow

The IEEE754 2008 standard (ยง7.5) defines that the underflow exception shall be signalled when the result is non-zero, and strictly between -MinNorm and +MinNorm: it leaves it up to implementation as to whether this is before or after rounding, so you could have values just below minNorm that get rounded...

c++,byte,overflow,increment,underflow

I can at least explain your results with 0x0 by 0xA: On Windows, a newline in text files is typically represented as \r\n rather than \n and the file I/O functions will helpfully make this translation for you. In this case you don't desire the conversion though so you could...