bug #1236: fix possible integer overflow in density estimation.

(grafted from e8cef383b7100b29e32f3c5acfa8d54d9732d2d0
)
This commit is contained in:
Gael Guennebaud 2016-05-26 17:51:04 +02:00
parent 1cff196837
commit 909747d6b2

View File

@ -48,7 +48,7 @@ static void sparse_sparse_product_with_pruning_impl(const Lhs& lhs, const Rhs& r
res.resize(rows, cols);
res.reserve(estimated_nnz_prod);
double ratioColRes = double(estimated_nnz_prod)/double(lhs.rows()*rhs.cols());
double ratioColRes = double(estimated_nnz_prod)/(double(lhs.rows())*double(rhs.cols()));
for (Index j=0; j<cols; ++j)
{
// FIXME: