/libcore/benchmarks/src/benchmarks/ |
D | XmlSerializeBenchmark.java | 57 while(r.nextDouble() < contChance) { in serializeRandomXml() 58 while(level > 0 && r.nextDouble() < levelUpChance) { in serializeRandomXml() 62 while(r.nextDouble() < levelDownChance) { in serializeRandomXml() 68 while(r.nextDouble() < attributeChance) { in serializeRandomXml() 73 while(r.nextDouble() < writeChance1) in serializeRandomXml() 75 while(r.nextDouble() < writeChance2) in serializeRandomXml()
|
/libcore/ojluni/src/test/java/util/Random/ |
D | RandomNextDoubleBoundary.java | 46 var r = sr.nextDouble(lowerBound, upperBound); in negativeBounds() 73 public double nextDouble() { in nextDoublesWithRange() 82 double value = rg.nextDouble(origin, bound); in nextDoublesWithRange() 85 value = rg.nextDouble(bound); // Equivalent to nextDouble(0.0, bound) in nextDoublesWithRange()
|
D | RandomCanaryPi.java | 45 double x = rng.nextDouble(); in pi() 46 double y = rng.nextDouble(); in pi()
|
D | RandomTestCoverage.java | 68 double d1 = rng.nextDouble(); in coverRandomGenerator() 69 double d2 = rng.nextDouble(1.0); in coverRandomGenerator() 70 double d3 = rng.nextDouble(0.5, 1.0); in coverRandomGenerator()
|
D | RandomTestChiSquared.java | 195 …le(" + N + ")", (String id) -> () -> testRngChiSquared(id, N, () -> (int)(rng.nextDouble(N)) % N)); in testOneRng() 196 …) + ")", (String id) -> () -> testRngChiSquared(id, N, () -> (int)(rng.nextDouble(43, N+43) - 43) … in testOneRng() 197 …) + ")", (String id) -> () -> testRngChiSquared(id, N, () -> (int)(rng.nextDouble(-59, N-59) + 59)… in testOneRng()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/ |
D | ChoiceFormatTest.java | 31 double[] limits = new double[] { 0, 1, ChoiceFormat.nextDouble(1), 32 ChoiceFormat.nextDouble(2) }; 151 double[] choiceLimits = { -1, 0, 1, ChoiceFormat.nextDouble(1) }; in test_applyPatternLjava_lang_String() 180 choiceLimits[0] = ChoiceFormat.nextDouble(-1); in test_applyPatternLjava_lang_String() 217 double[] orangeLimits = { -2, 0, ChoiceFormat.nextDouble(0), 1, 2 }; in test_equalsLjava_lang_Object() 311 assertTrue("Not greater 5", ChoiceFormat.nextDouble(5) > 5); in test_nextDoubleD() 312 assertTrue("Not greater 0", ChoiceFormat.nextDouble(0) > 0); in test_nextDoubleD() 313 assertTrue("Not greater -5", ChoiceFormat.nextDouble(-5) > -5); in test_nextDoubleD() 314 assertTrue("Not NaN", Double.isNaN(ChoiceFormat.nextDouble(Double.NaN))); in test_nextDoubleD() 323 assertTrue("Not greater 0", ChoiceFormat.nextDouble(0, true) > 0); in test_nextDoubleDZ() [all …]
|
/libcore/ojluni/src/test/java/util/concurrent/tck/ |
D | SplittableRandomTest.java | 118 double f = sr.nextDouble(); 120 while (i < NCALLS && sr.nextDouble() == f) 310 () -> sr.nextDouble(-17.0d), 311 () -> sr.nextDouble(0.0d), 312 () -> sr.nextDouble(-Double.MIN_VALUE), 313 () -> sr.nextDouble(Double.NEGATIVE_INFINITY), 314 () -> sr.nextDouble(Double.NaN)); 324 () -> sr.nextDouble(17.0d, 2.0d), 325 () -> sr.nextDouble(-42.0d, -42.0d), 326 () -> sr.nextDouble(Double.MAX_VALUE, Double.MIN_VALUE), [all …]
|
D | ThreadLocalRandomTest.java | 174 double f = ThreadLocalRandom.current().nextDouble(); 176 while (i < NCALLS && ThreadLocalRandom.current().nextDouble() == f) 349 rnd.nextDouble(bound); 362 double f = ThreadLocalRandom.current().nextDouble(least, bound); 367 (j = ThreadLocalRandom.current().nextDouble(least, bound)) == f) {
|
/libcore/ojluni/annotations/flagged_api/java/util/concurrent/ |
D | ThreadLocalRandom.annotated.java | 75 public double nextDouble() { throw new RuntimeException("Stub!"); } in nextDouble() method in ThreadLocalRandom 77 public double nextDouble(double bound) { throw new RuntimeException("Stub!"); } in nextDouble() method in ThreadLocalRandom 79 public double nextDouble(double origin, double bound) { throw new RuntimeException("Stub!"); } in nextDouble() method in ThreadLocalRandom
|
/libcore/ojluni/src/main/java/java/util/ |
D | PrimitiveIterator.java | 235 double nextDouble(); in nextDouble() method 249 action.accept(nextDouble()); in forEachRemaining() 262 return nextDouble(); in next()
|
D | Random.java | 482 public double nextDouble() { in nextDouble() method in Random 544 v1 = 2 * nextDouble() - 1; // between -1 and 1 in nextGaussian() 545 v2 = 2 * nextDouble() - 1; // between -1 and 1 in nextGaussian()
|
/libcore/ojluni/src/main/java/java/util/concurrent/ |
D | ThreadLocalRandom.java | 519 public double nextDouble() { in nextDouble() method in ThreadLocalRandom 520 return super.nextDouble(); in nextDouble() 529 public double nextDouble(double bound) { in nextDouble() method in ThreadLocalRandom 530 return super.nextDouble(bound); in nextDouble() 539 public double nextDouble(double origin, double bound) { in nextDouble() method in ThreadLocalRandom 540 return super.nextDouble(origin, bound); in nextDouble()
|
/libcore/ojluni/src/test/java/util/Scanner/ |
D | ScanTest.java | 703 Scanner::nextDouble, 872 if (sc.nextDouble() != -3d) failCount++; in floatPatternBody() 873 if (sc.nextDouble() != -44.05d) failCount++; in floatPatternBody() 876 if (sc.nextDouble() != -3400000d) failCount++; in floatPatternBody() 877 if (sc.nextDouble() != 56566.6d) failCount++; in floatPatternBody() 878 if (sc.nextDouble() != Double.POSITIVE_INFINITY) failCount++; in floatPatternBody() 879 if (sc.nextDouble() != Double.POSITIVE_INFINITY) failCount++; in floatPatternBody() 880 if (sc.nextDouble() != Double.NEGATIVE_INFINITY) failCount++; in floatPatternBody() 881 if (!Double.valueOf(sc.nextDouble()).isNaN()) failCount++; in floatPatternBody() 882 if (!Double.valueOf(sc.nextDouble()).isNaN()) failCount++; in floatPatternBody() [all …]
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
D | ThreadLocalRandomTest.java | 107 double f = ThreadLocalRandom.current().nextDouble(); 109 while (i < NCALLS && ThreadLocalRandom.current().nextDouble() == f) 323 rnd.nextDouble(bound); 336 double f = ThreadLocalRandom.current().nextDouble(least, bound); 341 (j = ThreadLocalRandom.current().nextDouble(least, bound)) == f) {
|
/libcore/ojluni/src/main/java/java/util/random/ |
D | RandomGenerator.java | 174 return DoubleStream.generate(this::nextDouble).sequential(); in doubles() 202 …return DoubleStream.generate(() -> nextDouble(randomNumberOrigin, randomNumberBound)).sequential(); in doubles() 566 default double nextDouble() { in nextDouble() method 588 default double nextDouble(double bound) { in nextDouble() method 614 default double nextDouble(double origin, double bound) { in nextDouble() method
|
/libcore/luni/src/test/java/libcore/dalvik/system/ |
D | EmulatedStackFrameTest.java | 54 assertEquals(52.0, reader.nextDouble()); in testReaderWriter_allParamTypes() 112 assertEquals(52.0, reader.nextDouble()); in testRandomReaderWriter_allParamTypes() 172 assertEquals(73.0, reader.nextDouble()); in testReaderWriter_allReturnTypes() 212 reader.nextDouble(); in testReaderWriter_wrongTypes() 220 reader.nextDouble(); in testReaderWriter_wrongTypes()
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | RandomTest.java | 233 rands[i] = rand.nextDouble(); in test_doubles$() 247 rands[i] = rand.nextDouble(); in test_doubles$L() 268 double r = rand.nextDouble() * (bound - origin) + origin; in test_doubles$II() 292 double r = rand.nextDouble() * (bound - origin) + origin; in test_doubles$LII()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | RandomTest.java | 98 double lastNum = r.nextDouble(); in test_nextDouble() 103 nextNum = r.nextDouble(); in test_nextDouble() 285 mr.nextDouble(); in test_next()
|
D | ScannerTest.java | 4442 assertEquals(123.0, s.nextDouble()); in test_hasNextDouble() 4444 assertEquals(456.0, s.nextDouble()); in test_hasNextDouble() 4446 assertEquals(123.4, s.nextDouble()); in test_hasNextDouble() 4448 assertEquals(0.123, s.nextDouble()); in test_hasNextDouble() 4451 s.nextDouble(); in test_hasNextDouble() 4459 assertEquals(123.4, s.nextDouble()); in test_hasNextDouble() 4461 assertEquals(-456.7, s.nextDouble()); in test_hasNextDouble() 4463 assertEquals(123456.789, s.nextDouble()); in test_hasNextDouble() 4466 s.nextDouble(); in test_hasNextDouble() 4475 assertEquals(1.234E12, s.nextDouble()); in test_hasNextDouble() [all …]
|
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ |
D | DoublePrimitiveOpsTests.java | 75 double[] content = DoubleStream.generate(() -> r.nextDouble()).limit(10).toArray(); in testSort() 109 double[] content = DoubleStream.generate(() -> r.nextDouble()).limit(10).toArray(); in testSortSort()
|
/libcore/ojluni/src/main/java/java/text/ |
D | ChoiceFormat.java | 221 startValue = nextDouble(startValue); in applyPattern() 472 public static final double nextDouble (double d) { in nextDouble() method in ChoiceFormat 575 public static double nextDouble (double d, boolean positive) { in nextDouble() method in ChoiceFormat
|
/libcore/ojluni/annotations/flagged_api/java/util/random/ |
D | RandomGenerator.annotated.java | 73 public default double nextDouble() { throw new RuntimeException("Stub!"); } in nextDouble() method 75 public default double nextDouble(double bound) { throw new RuntimeException("Stub!"); } in nextDouble() method 77 public default double nextDouble(double origin, double bound) { throw new RuntimeException("Stub!")… in nextDouble() method
|
/libcore/ojluni/src/test/java/lang/StrictMath/ |
D | Tests.java | 65 double tmp = random.nextDouble(); // Double in the range of [0.0, 1.0) in createRandomDouble()
|
/libcore/ojluni/src/test/java/text/Format/NumberFormat/ |
D | SerializationSaveTest.java | 69 return _decFormat.format(r.nextDouble()); in Update()
|
D | SerializationLoadTest.java | 80 return _decFormat.format(r.nextDouble()); in Update()
|