[9] RFR of 8023217: Additional floorDiv/floorMod/multiplyExact methods for java.lang.Math

Brian Burkhalter brian.burkhalter at oracle.com
Tue Sep 29 01:06:40 UTC 2015

Please review at your convenience.

Issue:	https://bugs.openjdk.java.net/browse/JDK-8023217
Patch:	http://cr.openjdk.java.net/~bpb/8023217/webrev.00/

Add some additional methods of the same name as existing methods but with the commonly used parameter signature “long,int”:

long multiplyExact(long,int)
long floorDiv(long,int)
int floorDiv(long,int)

These methods also provide hooks for potential intrinsics. There might be room for improvement in their Java implementations.

The modifications to the java.time classes are to fix warnings about “redundant cast to int.” 



More information about the core-libs-dev mailing list