Skip to content

Commit

Permalink
AUGLAG: Fix arithmetic exception (#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
jschueller authored and stevengj committed Dec 14, 2018
1 parent 0a1a910 commit 3b08173
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/algs/auglag/auglag.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ nlopt_result auglag_minimize(int n, nlopt_func f, void *f_data,
*minf = fcur;
minf_penalty = penalty;
minf_feasible = feasible;
d.rho = MAX(1e-6, MIN(10, 2 * fabs(*minf) / con2));
d.rho = (con2 > 0) ? MAX(1e-6, MIN(10, 2 * fabs(*minf) / con2)) : 10;
}
else
d.rho = 1; /* whatever, doesn't matter */
Expand Down

0 comments on commit 3b08173

Please sign in to comment.