@@ -271,11 +271,11 @@ void ReluConstraint::notifyUpperBound( unsigned variable, double newBound )
271271 _boundManager->tightenUpperBound ( _b, bound, *_tighteningRow );
272272 else
273273 {
274- if ( FloatUtils::isZero ( bound ) )
274+ if ( ! FloatUtils::isPositive ( bound ) )
275275 _boundManager->addLemmaExplanationAndTightenBound (
276276 _b, 0 , Tightening::UB, { variable }, Tightening::UB, getType () );
277277 // Bound cannot be negative if ReLU is inactive
278- else if ( FloatUtils::isNegative ( bound ) )
278+ if ( FloatUtils::isNegative ( bound ) )
279279 throw InfeasibleQueryException ();
280280 }
281281 }
@@ -326,11 +326,11 @@ void ReluConstraint::notifyUpperBound( unsigned variable, double newBound )
326326 _boundManager->tightenLowerBound ( _b, -bound, *_tighteningRow );
327327 else
328328 {
329- if ( FloatUtils::isZero ( bound ) )
329+ if ( ! FloatUtils::isPositive ( bound ) )
330330 _boundManager->addLemmaExplanationAndTightenBound (
331331 _b, 0 , Tightening::LB, { variable }, Tightening::UB, getType () );
332332 // Bound cannot be negative if ReLU is active
333- else if ( FloatUtils::isNegative ( bound ) )
333+ if ( FloatUtils::isNegative ( bound ) )
334334 throw InfeasibleQueryException ();
335335 }
336336 }
0 commit comments