Skip to content

Commit

Permalink
minor enhancement
Browse files Browse the repository at this point in the history
  • Loading branch information
yoelcortes committed Sep 17, 2022
1 parent 464e367 commit a54dc67
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions flexsolve/bounded_solvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,11 @@ def IQ_interpolation(
if y1 < 0.: x1, y1, x0, y0 = x0, y0, x1, y1
df0 = -y0
dx = x1 - x0
if checkbounds: utils.check_bounds(y0, y1)
if guess_x:
x = utils.false_position_iter(x0, x1, dx, y0, y1, df0, x0)
y = f(x, *args)
if not checkroot and abs_(y) < ytol or y == 0: return x # Lucky guess
if checkbounds: utils.check_bounds(y0, y1)

for iter in range(maxiter):
if y > 0.:
y2 = y1
Expand Down

0 comments on commit a54dc67

Please sign in to comment.