Changeset 9305


Ignore:
Timestamp:
08/11/11 16:42:35 (14 years ago)
Author:
Eric.Larour
Message:

isnan issue

Location:
issm/trunk/src/c/shared/Numerics
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/shared/Numerics/BrentSearch.cpp

    r8275 r9305  
    4242        iter=0;
    4343        fxmin = (*f)(xmin,optargs);
    44         if isnan(fxmin) _error_("Function evaluation returned NaN");
     44        if (isnan(fxmin)) _error_("Function evaluation returned NaN");
    4545        _printf_(VerboseControl(),"\n        Iteration         x           f(x)       Tolerance         Procedure\n\n");
    4646        _printf_(VerboseControl(),"        %s    %12.6g  %12.6g  %s","   N/A",xmin,fxmin,"         N/A         boundary\n");
    4747        fxmax = (*f)(xmax,optargs);
    48         if isnan(fxmax) _error_("Function evaluation returned NaN");
     48        if (isnan(fxmax)) _error_("Function evaluation returned NaN");
    4949        _printf_(VerboseControl(),"        %s    %12.6g  %12.6g  %s","   N/A",xmax,fxmax,"         N/A         boundary\n");
    5050
  • issm/trunk/src/c/shared/Numerics/OptimalSearch.cpp

    r6412 r9305  
    4040        //get the value of the function at the first boundary
    4141        fx1= (*f)(x1,optargs);
    42         if isnan(fx1) _error_("Function evaluation returned NaN");
     42        if (isnan(fx1)) _error_("Function evaluation returned NaN");
    4343        _printf_(VerboseControl(),"\n        Iteration         x           f(x)       Tolerance\n\n");
    4444        _printf_(VerboseControl(),"        %s    %12.6g  %12.6g  %s","   N/A",x1,fx1,"         N/A\n");
     
    5353                iter++;
    5454                fx2 = (*f)(x2,optargs);
    55                 if isnan(fx2) _error_("Function evaluation returned NaN");
     55                if (isnan(fx2)) _error_("Function evaluation returned NaN");
    5656                _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));
    5757
Note: See TracChangeset for help on using the changeset viewer.