Skip to content

Commit

Permalink
add extra check to newton step
Browse files Browse the repository at this point in the history
  • Loading branch information
bodono committed Apr 4, 2023
1 parent 3e561c6 commit c98fb72
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/exp_cone.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ static scs_float root_search_newton(const scs_float *v0, scs_float xl,

for (i = 0; i < MAXITER; i++) {
hfun(v0, x, &f, &df);

if (ABS(f) <= EPS) { /* root found */
break;
}

if (f < 0.0) {
xl = x;
} else {
Expand Down

0 comments on commit c98fb72

Please sign in to comment.