Skip to content

Commit f2e5be0

Browse files
committed
fix a bug of uninit variable in line search
1 parent 0f79c05 commit f2e5be0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/module_relax/relax_new/line_search.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ bool Line_Search::brent(
201201
{
202202
ls_step ++;
203203

204-
double xd,xe,xm;
204+
double xd = 0.0,xe = 0.0 ,xm = 0.0;
205205
// if no zero is between xa and xb
206206
if(!bracked)
207207
{
@@ -389,4 +389,4 @@ bool Line_Search::brent(
389389
}
390390
return false;
391391
}//end ibrack
392-
}
392+
}

0 commit comments

Comments
 (0)