diff --git a/src/dp_learning_ff/utils.py b/src/dp_learning_ff/utils.py index c412b5a..61648c4 100644 --- a/src/dp_learning_ff/utils.py +++ b/src/dp_learning_ff/utils.py @@ -119,8 +119,8 @@ def strictness_comp( curr_obj = f(x) if ( strictness_comp(curr_obj, target, strictly) - and target - curr_obj < abs_tol - and (target - curr_obj) / target < rel_tol + and abs(target - curr_obj) < abs_tol + and abs((target - curr_obj) / target) < rel_tol ): break if monotonicity_comp(x, target, f_monotonicity):