27 Mar
2017
27 Mar
'17
1:06 p.m.
At 11:50 AM 3/27/2017, Mike Speciner wrote:
No, e.g., int32 x = -1<<31, y = -1 In that case x+y == -1 is definitely not equal to (double)x+(double)y
That's not well behaved in the integer domain either - you ought to get a range exception, but of course you never do. In cases where the pure integer arithmetic is well behaved, is there any case where the same calculation in IEEE doubles gives a different result?