public static int getBiggestPrime(long value)
  {
    for (int i = PRIMES.length - 1; i >= 0; i--) {
      if (PRIMES[i] <= value) {
        return PRIMES[i];
      }
    }

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