code: public static int getBiggestPrime(long value)
    {
      for (int i = PRIMES.length - 1; i >= 0; i--) {
        if (PRIMES[i] <= value) {
          return PRIMES[i];
        }
      }
  
      return 2;
    }
docs: Returns the largest prime less than the given bits.