code: func SimilarityBbit(sig1, sig2 []uint64, b uint) float64 {
  
  	if len(sig1) != len(sig2) {
  		panic("signature size mismatch")
  	}
  
  	intersect := 0
  	count := 0
  
  	mask := uint64(1<<b) - 1
  
  	for i := range sig1 {
  		w1 := sig1[i]
  		w2 := sig2[i]
  
  		bits := uint(64)
  
  		for bits >= b {
  			v1 := (w1 & mask)
  			v2 := (w2 & mask)
  
  			count++
  			if v1 == v2 {
  				intersect++
  			}
  
  			bits -= b
  			w1 >>= b
  			w2 >>= b
  		}
  	}
  
  	return float64(intersect) / float64(count)
  }
docs: // SimilarityBbit computes an estimate for the similarity between two b-bit signatures