summaryrefslogtreecommitdiff
path: root/decoder
diff options
context:
space:
mode:
Diffstat (limited to 'decoder')
-rw-r--r--decoder/sparse_vector.h2
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>