<gouthampradhan>math_CountPrimes_1.java
public int countPrimes(int n) {
    if (n == 0 || n == 1 || n == 2) return 0;
    else if (n == 3) return 1;
    BitSet set = new BitSet();
    n = n - 1;
    int sqRt = (int) Math.sqrt(n);
    int count = n;
    for (int i = 2; i <= sqRt; i++) {
      if (!set.get(i)) {
        for (int j = 2; (i * j) <= n; j++) {
          if (!set.get(i * j)) {
            count--;
            set.set(i * j);
          }
        }
      }
    }
    return count - 1;
  }
public int sample_funcname ( int var_0 ) {
  if ( var_0 == 0 || var_0 == 1 || var_0 == 2 ) return 0 ;
  else if ( var_0 == 3 ) return 1 ;
  BitSet set = new BitSet ( ) ;
  var_0 = var_0 - 1 ;
  int var_9 = ( int ) Math . sqrt ( var_0 ) ;
  int var_10 = var_0 ;
  for ( int var_11 = 2 ;
  var_11 <= var_9 ;
  var_11 ++ ) {
    if ( ! set . get ( var_11 ) ) {
      for ( int var_13 = 2 ;
      ( var_11 * var_13 ) <= var_0 ;
      var_13 ++ ) {
        if ( ! set . get ( var_11 * var_13 ) ) {
          var_10 -- ;
          set . set ( var_11 * var_13 ) ;
        }
      }
    }
  }
  return var_10 - 1 ;
}
