We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a247c31 commit 5378ffbCopy full SHA for 5378ffb
tests/testthat/cpp/distance.cpp
@@ -66,7 +66,7 @@ NumericMatrix rcpp_js_distance(NumericMatrix mat) {
66
double d2 = kl_divergence(row2.begin(), row2.end(), avg.begin());
67
68
// write to output matrix
69
- rmat(i,j) = std::sqrt(.5 * (d1 + d2));
+ rmat(i,j) = std::sqrt((double)(.5 * (d1 + d2)));
70
}
71
72
0 commit comments