class SplittableRandom

Martin Buchholz martinrb at
Mon Jul 15 22:29:34 UTC 2013

Another variant with few bits in seed or gamma is:

    public void testYYYY() {
        SplittableRandom r = new SplittableRandom(0L, 1L<<61, new Error());
        int prev = 0;
        for (int i = 0; i < 30; i++) {
            int next = r.nextInt();
            System.out.printf("next=%08x diff=%08x%n", next, next - prev);
            prev = next;

which produces the "almost arithmetic sequence"

     [java] next=41a85ec5 diff=41a85ec5
     [java] next=8350bd8a diff=41a85ec5
     [java] next=c4f91c4f diff=41a85ec5
     [java] next=06a17b14 diff=41a85ec5
     [java] next=4849d9d9 diff=41a85ec5
     [java] next=89f2389f diff=41a85ec6
     [java] next=cb9a9764 diff=41a85ec5
     [java] next=b8085924 diff=ec6dc1c0
     [java] next=365ffa5e diff=7e57a13a
     [java] next=b4b79b99 diff=7e57a13b
     [java] next=330f3cd4 diff=7e57a13b
     [java] next=b166de0f diff=7e57a13b
     [java] next=2fbe7f4a diff=7e57a13b
     [java] next=ae162084 diff=7e57a13a
     [java] next=2c6dc1bf diff=7e57a13b
     [java] next=b687cb0b diff=8a1a094c
     [java] next=34df6c46 diff=7e57a13b
     [java] next=b3370d81 diff=7e57a13b
     [java] next=318eaebb diff=7e57a13a
     [java] next=afe64ff6 diff=7e57a13b
     [java] next=2e3df131 diff=7e57a13b
     [java] next=ac95926c diff=7e57a13b
     [java] next=2aed33a7 diff=7e57a13b
     [java] next=b5073cf2 diff=8a1a094b
     [java] next=335ede2d diff=7e57a13b
     [java] next=b1b67f68 diff=7e57a13b
     [java] next=300e20a3 diff=7e57a13b
     [java] next=ae65c1dd diff=7e57a13a
     [java] next=2cbd6318 diff=7e57a13b
     [java] next=ab150453 diff=7e57a13b

More information about the core-libs-dev mailing list