Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 24 of 24 for nextLong (0.18 sec)

  1. android/guava-tests/test/com/google/common/math/LongMathTest.java

        Random rand = new Random(1);
        for (int bits = 10; bits < 63; bits++) {
          for (int i = 0; i < 2000; i++) {
            // A random long between 0 and Long.MAX_VALUE, inclusive.
            long l = rand.nextLong() & ((1L << bits) - 1);
            assertEquals(BigInteger.valueOf(l).isProbablePrime(100), LongMath.isPrime(l));
          }
        }
      }
    
      @GwtIncompatible // isPrime is GWT-incompatible
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Mar 04 20:15:57 GMT 2024
    - 32.5K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/math/LongMathTest.java

        Random rand = new Random(1);
        for (int bits = 10; bits < 63; bits++) {
          for (int i = 0; i < 2000; i++) {
            // A random long between 0 and Long.MAX_VALUE, inclusive.
            long l = rand.nextLong() & ((1L << bits) - 1);
            assertEquals(BigInteger.valueOf(l).isProbablePrime(100), LongMath.isPrime(l));
          }
        }
      }
    
      @GwtIncompatible // isPrime is GWT-incompatible
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Mar 04 20:15:57 GMT 2024
    - 32.5K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/primitives/LongsTest.java

      }
    
      public void testByteArrayRoundTrips() {
        Random r = new Random(5);
        byte[] b = new byte[Longs.BYTES];
    
        for (int i = 0; i < 1000; i++) {
          long num = r.nextLong();
          assertThat(Longs.fromByteArray(Longs.toByteArray(num))).isEqualTo(num);
    
          r.nextBytes(b);
          long value = Longs.fromByteArray(b);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 30K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/primitives/LongsTest.java

      }
    
      public void testByteArrayRoundTrips() {
        Random r = new Random(5);
        byte[] b = new byte[Longs.BYTES];
    
        for (int i = 0; i < 1000; i++) {
          long num = r.nextLong();
          assertThat(Longs.fromByteArray(Longs.toByteArray(num))).isEqualTo(num);
    
          r.nextBytes(b);
          long value = Longs.fromByteArray(b);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 30K bytes
    - Viewed (0)
Back to top