diff --git a/highs/presolve/HPresolve.cpp b/highs/presolve/HPresolve.cpp index 4c20fac715d..94e8b33e3be 100644 --- a/highs/presolve/HPresolve.cpp +++ b/highs/presolve/HPresolve.cpp @@ -3270,7 +3270,7 @@ HPresolve::Result HPresolve::singletonRow(HighsPostsolveStack& postsolve_stack, // use either the primal feasibility tolerance for the bound constraint or // for the singleton row including scaling, whichever is tighter. - const double boundTol = primal_feastol / std::max(1.0, std::fabs(val)); + const double boundTol = std::max(primal_feastol / std::max(1.0, std::fabs(val)), 1e-15); const bool isIntegral = model->integrality_[col] != HighsVarType::kContinuous; bool lowerTightened = newColLower > model->col_lower_[col] + boundTol; @@ -4297,7 +4297,7 @@ HPresolve::Result HPresolve::rowPresolve(HighsPostsolveStack& postsolve_stack, direction * impliedRowBound == kHighsInf || abs(static_cast(rowSide) - static_cast(impliedRowBound)) > - primal_feastol / dynamism) + std::max(double(primal_feastol / dynamism), 1e-15)) return Result::kOk; // get stored row @@ -4584,7 +4584,7 @@ HPresolve::Result HPresolve::detectDominatedCol( : -impliedDualRowBounds.getSumLowerOrig( col, -model->col_cost_[col]); if (std::abs(boundOnColDual) <= - options->dual_feasibility_tolerance / dynamism) { + std::max(double(options->dual_feasibility_tolerance / dynamism), 1e-15)) { // 1. column dual's upper bound is zero (since the column's lower bound // is infinite) and column dual's lower bound is zero as well // (direction = 1) or