There is a need for arithmetic operations that throw exceptions
when the results overflow the representation of int or long.

The CR is 6708398: Support integer overflow <http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6708398>

Please review this webrev <http://cr.openjdk.java.net/%7Erriggs/CR6708398/webrev/> to add static methods in java.lang.Math
to support addExact(), subtractExact(), negateExact(), multiplyExact(),
and toIntExact() for int and long primitive types.

Thanks, Roger Riggs

Reply via email to