private static long addAndCheck(long a,long b,Localizable pattern) throws MathRuntimeException {
  final long result=a + b;
  if (!((a ^ b) < 0 || (a ^ result) >= 0)) {
    throw new MathRuntimeException(pattern,a,b);
  }
  return result;
}

private static long addAndCheck ( long a , long b , Localizable pattern ) throws MathRuntimeException { final long result = a + b ; if ( ! ( ( a ^ b ) < 0 || ( a ^ result ) >= 0 ) ) { throw new MathRuntimeException ( pattern , a , b ) ; } return result ; }
add two long integers , checking for overflow .
