leerho commented on PR #516: URL: https://github.com/apache/datasketches-java/pull/516#issuecomment-1980011529
Removed two asserts and converted another one to throw ArithmeticException when the sum of two longs overflows. Turns out that ` long Math.addExact(long,long) ` is the perfect solution. It tests for overflow and if true throws an ArithmeticException with the comment "long overflow", which is perfect. And it is fast. I checked the Math source code. This is a new exception, but it is thrown just before the sketch crashes. So I do not believe this, on its own warrants a major release. However, once we are all done, we may have other reasons for a major release. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
