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

Increase uniformity of the distribution of BigIntegers constructed by BigInteger(int, Random)

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Withdrawn
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:

      Description

      As described in JDK-8146153, the constructor BigInteger(int numBits, Random rnd) generates BigIntegers which are highly skewed toward the upper end of the half-open interval [0, 2^numBits). A simple change is suggested in the aforementioned issue which would likely greatly reduce although not entirely alleviate the lack of uniformity in the distribution of BigIntegers which this constructor produces. This change should be evaluated and considered if testing shows a significant improvement.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bpb Brian Burkhalter
                Reporter:
                bpb Brian Burkhalter
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: