@Test(invocationCount = 5) public void toDouble2_long() { final Random random = new LCG64ShiftRandom(); final Histogram<Double> histogram = Histogram.ofDouble(0.0, 1.0, 15); for (int i = 0; i < 100000; ++i) { histogram.accept(toDouble2(random.nextLong())); } assertUniformDistribution(histogram); }
@Test(invocationCount = 5) public void toDouble_int_int() { final Random random = new LCG64ShiftRandom(); final Histogram<Double> histogram = Histogram.ofDouble(0.0, 1.0, 15); for (int i = 0; i < 100000; ++i) { final long value = random.nextLong(); histogram.accept(toDouble((int) (value >>> 32), (int) value)); } assertUniformDistribution(histogram); }