Changeset 13056 for issm/trunk-jpl/src/c/shared/Numerics/BrentSearch.cpp
- Timestamp:
- 08/15/12 19:10:41 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/shared/Numerics/BrentSearch.cpp
r13055 r13056 44 44 iter=0; 45 45 fxmin = (*f)(xmin,optargs); 46 if (xIsNan<IssmDouble>(fxmin)) _error 2_("Function evaluation returned NaN");46 if (xIsNan<IssmDouble>(fxmin)) _error_("Function evaluation returned NaN"); 47 47 cout<<setprecision(5); 48 48 if(VerboseControl()) _pprintLine_(""); … … 51 51 if(VerboseControl()) _pprintLine_(" N/A "<<setw(12)<<xmin<<" "<<setw(12)<<fxmin<<" N/A boundary"); 52 52 fxmax = (*f)(xmax,optargs); 53 if (xIsNan<IssmDouble>(fxmax)) _error 2_("Function evaluation returned NaN");53 if (xIsNan<IssmDouble>(fxmax)) _error_("Function evaluation returned NaN"); 54 54 if(VerboseControl()) _pprintLine_(" N/A "<<setw(12)<<xmax<<" "<<setw(12)<<fxmax<<" N/A boundary"); 55 55 … … 75 75 /*2: call the function to be evaluated*/ 76 76 fxbest = (*f)(x,optargs); 77 if(xIsNan<IssmDouble>(fxbest)) _error 2_("Function evaluation returned NaN");77 if(xIsNan<IssmDouble>(fxbest)) _error_("Function evaluation returned NaN"); 78 78 iter=iter+1; 79 79 … … 159 159 //evaluate function on x 160 160 fx = (*f)(x,optargs); 161 if(xIsNan<IssmDouble>(fx)) _error 2_("Function evaluation returned NaN");161 if(xIsNan<IssmDouble>(fx)) _error_("Function evaluation returned NaN"); 162 162 iter=iter+1; 163 163
Note:
See TracChangeset
for help on using the changeset viewer.