-
Enhancement
-
Resolution: Fixed
-
P4
-
16
-
b16
-
generic
-
generic
-
Verified
A DESCRIPTION OF THE PROBLEM :
j.l.Math only exposes a floorDiv() family and not a ceilDiv() family as well.
When determining how many blocks of size n are minimally needed to host m items, for example, the computation behind the scenes is something akin to ceilDiv(m, n). I guess there are many customized ceilDiv()-like computations in the code base, probably some of them incorrect at the extrema of the int/long ranges. Thus, an official ceilDiv() family is certainly helpful.
j.l.Math only exposes a floorDiv() family and not a ceilDiv() family as well.
When determining how many blocks of size n are minimally needed to host m items, for example, the computation behind the scenes is something akin to ceilDiv(m, n). I guess there are many customized ceilDiv()-like computations in the code base, probably some of them incorrect at the extrema of the int/long ranges. Thus, an official ceilDiv() family is certainly helpful.
- csr for
-
JDK-8273090 Add Math.ceilDiv() family parallel to Math.floorDiv() family
-
- Closed
-
- duplicates
-
JDK-8164433 Add ceilDiv() to java.lang.Math
-
- Closed
-