code: @SuppressWarnings("unchecked")
      public static double tanimotoCoefficient(IntegerVector a, IntegerVector b) {
          check(a,b);
  
          // IMPLEMENTATION NOTE: The Tanimoto coefficient uses the squart of the
          // vector magnitudes, which we could compute by just summing the square
          // of the vector values.  This would save a .sqrt() call from the
          // .magnitude() call.  However, we expect that this method might be
          // called multiple times.  Therefore, we square the .magnitude() which
          // should only be two multiplications instaned of |nz| multiplications
          // on the second call (assuming the vector instances cache their
          // magnitude, which almost all do).
          double aMagnitude = a.magnitude();
          double bMagnitude = b.magnitude();
  
          if (aMagnitude == 0 || bMagnitude == 0)
              return 0;
  
          int dotProduct = VectorMath.dotProduct(a, b);        
          double aMagSq = aMagnitude * aMagnitude;
          double bMagSq = bMagnitude * bMagnitude;
  
          return dotProduct / (aMagSq + bMagSq - dotProduct);
      }
docs: Returns the Tanimoto Coefficient of the two {@code IntegerVector}
  instances
  
  @throws IllegalArgumentException when the length of the two vectors are
  not the same.