Changeset 9305
- Timestamp:
- 08/11/11 16:42:35 (14 years ago)
- Location:
- issm/trunk/src/c/shared/Numerics
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/shared/Numerics/BrentSearch.cpp
r8275 r9305 42 42 iter=0; 43 43 fxmin = (*f)(xmin,optargs); 44 if isnan(fxmin) _error_("Function evaluation returned NaN");44 if (isnan(fxmin)) _error_("Function evaluation returned NaN"); 45 45 _printf_(VerboseControl(),"\n Iteration x f(x) Tolerance Procedure\n\n"); 46 46 _printf_(VerboseControl()," %s %12.6g %12.6g %s"," N/A",xmin,fxmin," N/A boundary\n"); 47 47 fxmax = (*f)(xmax,optargs); 48 if isnan(fxmax) _error_("Function evaluation returned NaN");48 if (isnan(fxmax)) _error_("Function evaluation returned NaN"); 49 49 _printf_(VerboseControl()," %s %12.6g %12.6g %s"," N/A",xmax,fxmax," N/A boundary\n"); 50 50 -
issm/trunk/src/c/shared/Numerics/OptimalSearch.cpp
r6412 r9305 40 40 //get the value of the function at the first boundary 41 41 fx1= (*f)(x1,optargs); 42 if isnan(fx1) _error_("Function evaluation returned NaN");42 if (isnan(fx1)) _error_("Function evaluation returned NaN"); 43 43 _printf_(VerboseControl(),"\n Iteration x f(x) Tolerance\n\n"); 44 44 _printf_(VerboseControl()," %s %12.6g %12.6g %s"," N/A",x1,fx1," N/A\n"); … … 53 53 iter++; 54 54 fx2 = (*f)(x2,optargs); 55 if isnan(fx2) _error_("Function evaluation returned NaN");55 if (isnan(fx2)) _error_("Function evaluation returned NaN"); 56 56 _printf_(VerboseControl()," %5i %12.6g %12.6g %12.6g\n",iter,x2,fx2,fabs(x2-x1)>fabs(fx2-fx1)?fabs(fx2-fx1):fabs(x2-x1)); 57 57
Note:
See TracChangeset
for help on using the changeset viewer.