For comparison, in Java, these 3 expressions each yield Integer.MIN_VALUE (i.e. -2147483648):
-Integer.MIN_VALUE Integer.MIN_VALUE * -1 Integer.MIN_VALUE / -1
edit On reflection I shouldn't have expected that, I recall reading John Regehr's blog post on the downsides of how Java defaults to wrapping behaviour: https://blog.regehr.org/archives/1401
For comparison, in Java, these 3 expressions each yield Integer.MIN_VALUE (i.e. -2147483648):
I have to admit I expected all 3 to throw.edit On reflection I shouldn't have expected that, I recall reading John Regehr's blog post on the downsides of how Java defaults to wrapping behaviour: https://blog.regehr.org/archives/1401