public static long pop_union(long[] arr1,long[] arr2,int wordOffset,int numWords){
  long popCount=0;
  for (int i=wordOffset, end=wordOffset + numWords; i < end; ++i) {
    popCount+=Long.bitCount(arr1[i] | arr2[i]);
  }
  return popCount;
}

public static long pop_union ( long [ ] arr1 , long [ ] arr2 , int wordOffset , int numWords ) { long popCount = 0 ; for ( int i = wordOffset , end = wordOffset + numWords ; i < end ; ++ i ) { popCount += Long . bitCount ( arr1 [ i ] | arr2 [ i ] ) ; } return popCount ; }
returns the popcount or cardinality of the union of two sets . neither array is modified .
