@@ -3957,10 +3957,10 @@ HPresolve::Result HPresolve::rowPresolve(HighsPostsolveStack& postsolve_stack,
39573957 roundedRhs += roundedRowCoefs[i] *
39583958 static_cast <HighsCDouble>(model->col_lower_ [col]);
39593959 }
3960- // flip coefficient sign for > = inequality
3960+ // flip coefficient sign for < = inequality
39613961 roundedRowCoefs[i] *= direction;
39623962 }
3963- // flip rhs sign for > = inequality
3963+ // flip rhs sign for < = inequality
39643964 roundedRhs *= direction;
39653965 };
39663966
@@ -3969,15 +3969,18 @@ HPresolve::Result HPresolve::rowPresolve(HighsPostsolveStack& postsolve_stack,
39693969 HighsCDouble& roundedRhs) {
39703970 bool accept = false ;
39713971 // round rhs (using feasibility tolerance)
3972- roundedRhs = ceil (rhs * s - primal_feastol);
3973- assert (roundedRhs != 0.0 );
3972+ HighsCDouble scalar = static_cast <HighsCDouble>(s);
3973+ roundedRhs = ceil (rhs * scalar - primal_feastol);
3974+ assert (roundedRhs > 0.0 );
39743975 HighsCDouble rhsRatio = rhs / roundedRhs;
3976+
39753977 for (size_t i = 0 ; i < rowCoefs.size (); ++i) {
39763978 // coefficient sign has not been flipped for complemented
39773979 // variables; take absolute value of coefficient.
39783980 double absCoef = std::abs (rowCoefs[i]);
39793981 // round coefficient
3980- roundedRowCoefs[i] = std::ceil (absCoef * s - kHighsTiny );
3982+ roundedRowCoefs[i] =
3983+ static_cast <double >(ceil (absCoef * scalar - kHighsTiny ));
39813984 // compare "normalised" coefficients, i.e. coefficients divided by
39823985 // corresponding rhs.
39833986 double threshold =
0 commit comments