diff --git a/src/adiar/internal/algorithms/quantify.h b/src/adiar/internal/algorithms/quantify.h index ad914b9ff..83a1b76da 100644 --- a/src/adiar/internal/algorithms/quantify.h +++ b/src/adiar/internal/algorithms/quantify.h @@ -908,11 +908,11 @@ namespace adiar::internal const size_t dd_size = dd.size(); // Do Partial Quantification as long as... - // 1. ... it stays smaller than 1+epsilon% of the input size. - const size_t transposition__size_threshold = static_cast( - std::min(std::numeric_limits::max(), - ep.template get() - * static_cast(dd_size))); + // 1. ... it stays smaller than 1+epsilon of the input size. + const size_t transposition__size_threshold = + (std::min(static_cast(std::numeric_limits::max() / 2u), + static_cast(ep.template get()) + * static_cast(dd_size))); // 2. ... it has not run more than the maximum number of iterations. const size_t transposition__max_iterations =