Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8271602

Add Math.ceilDiv() family parallel to Math.floorDiv() family

XMLWordPrintable

    • 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.



            rgiulietti Raffaello Giulietti
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: