[Scipy-tickets] [SciPy] #860: Ridder's method undercounts function evaluations

SciPy scipy-tickets@scipy....
Fri Jan 30 13:32:43 CST 2009


#860: Ridder's method undercounts function evaluations
----------------------+-----------------------------------------------------
 Reporter:  JedBrown  |       Owner:  somebody
     Type:  defect    |      Status:  new     
 Priority:  normal    |   Milestone:  0.8.0   
Component:  Other     |     Version:  devel   
 Severity:  normal    |    Keywords:          
----------------------+-----------------------------------------------------
 Patch:

 {{{
 --- ridder.c.orig       2009-01-30 10:21:11.000000000 -0900
 +++ ridder.c    2009-01-30 10:21:53.000000000 -0900
 @@ -29,7 +29,7 @@
          dn = SIGN(fb - fa)*dm*fm/sqrt(fm*fm - fa*fb);
          xn = xm - SIGN(dn)*DMIN(fabs(dn),fabs(dm) - .5*tol);
          fn = (*f)(xn,params);
 -        params->funcalls++;
 +        params->funcalls += 2;
          if (fn*fm < 0.0) {
              xa = xn; fa = fn; xb = xm; fb = fm;
          }
 }}}

-- 
Ticket URL: <http://scipy.org/scipy/scipy/ticket/860>
SciPy <http://www.scipy.org/>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list