tanimoto function

Tanimoto distance (lowlevel function)