[Scipy-tickets] [SciPy] #1198: optimize.bisection conditional test incorrect

SciPy Trac scipy-tickets@scipy....
Tue Jun 15 13:24:56 CDT 2010

#1198: optimize.bisection conditional test incorrect
 Reporter:  brownnr              |       Owner:  somebody
     Type:  defect               |      Status:  new     
 Priority:  low                  |   Milestone:  0.8.0   
Component:  Other                |     Version:  0.7.0   
 Keywords:  optimize, bisection  |  
 In scipy version 0.8.0b1 scipy.optimize.bisection() in minpack.py, the
 conditional test for the bisection method is incorrect.

 The first few lines read
 i = 1
 eva = func(a, *args)
 evb = func(b, *args)
 if eva*evb < 0:
   msg "Must start with interval where func(a) * func(b) < 0"
   raise ValueError(msg)

 But the function does meet that condition by the conditional statement
 given, so it should be negated or

 if eva*evb >= 0:

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

More information about the Scipy-tickets mailing list