bug-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gsl] Typo in min/brent.c


From: Paul Sydney
Subject: [Bug-gsl] Typo in min/brent.c
Date: Tue, 17 Feb 2004 17:42:43 -1000

Looks like a typo in min/brent.c. You should be compare bounds on both ends with
the new position:

[tools/gsl-1.4/min] sydney% diff -c brent.c brent.old
*** brent.c     Tue Feb 17 17:10:14 2004
--- brent.old   Tue Feb 17 17:09:55 2004
***************
*** 132,138 ****
        d = p / q;
        u = z + d;

!       if ((u - x_left) < t2 || (x_right - u) < t2)
          {
            d = (z < midpoint) ? tolerance : -tolerance ;
          }
--- 132,138 ----
        d = p / q;
        u = z + d;

!       if ((u - x_left) < t2 || (x_right - z) < t2)
          {
            d = (z < midpoint) ? tolerance : -tolerance ;
          }


Is this correct?

                                ...Paul






reply via email to

[Prev in Thread] Current Thread [Next in Thread]