diff options
Diffstat (limited to 'decoder/sparse_vector.h')
-rw-r--r-- | decoder/sparse_vector.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/decoder/sparse_vector.h b/decoder/sparse_vector.h index bfdeebcc..6b256a8e 100644 --- a/decoder/sparse_vector.h +++ b/decoder/sparse_vector.h @@ -83,7 +83,7 @@ public: template<typename S> S tanimoto_coef(const SparseVector<S> &vec) const { S dp=dot(vec); - return dp/(l2norm_sq()*vec.l2norm_sq()-dp); + return dp/(l2norm_sq()+vec.l2norm_sq()-dp); } template<typename S> |