public static int numberOfTrailingZerosSigned(long[] v){
  for (int p=0; ; p++) {
    if (p == v.length) {
      return -1;
    }
    if (v[p] != 0) {
      return Long.numberOfTrailingZeros(v[p]) + p * Long.SIZE;
    }
  }
}

public static int numberOfTrailingZerosSigned ( long [ ] v ) { for ( int p = 0 ; ; p ++ ) { if ( p == v . length ) { return - 1 ; } if ( v [ p ] != 0 ) { return Long . numberOfTrailingZeros ( v [ p ] ) + p * Long . SIZE ; } } }
find the number of trailing zeros .
