Skip to content

Commit 8a309c1

Browse files
committed
minor change
1 parent b2b58a1 commit 8a309c1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/modules/solvers/optimize.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,7 @@ function _1var_optimize_quad(f,x0,options)
275275
if xmin <= x_opt_quad_interp <= xmax
276276
x_opt = x_opt_quad_interp
277277
else
278-
phi = 0.618033988749 #to make it different from the bisection approach
279-
x_opt = phi*xmin + (1-phi)*xmax
278+
x_opt = 0.5*(xmin + xmax)
280279
end
281280
end
282281
f_opt = f(x_opt)

0 commit comments

Comments
 (0)