Boost logo

Boost Users :

Subject: [Boost-users] Issues with brent_find_minima
From: Frank Astier (fastier_at_[hidden])
Date: 2011-08-12 12:23:02


I must be missing something: the following program doesn't seem to find the right minimum (boost 1.47.0).

double f(double x) { return x * cos(x); }

int main(int argc, char** argv)
{
  cout << brent_find_minima(f, 3.0, 4.0, 1e-8) << endl;
  return 0;
}

I get: 4 -2.61457

But I think the minimum is -3.28837 at x = 3.42562.

Did I miss something in calling brent_find_minima??

Also, this function should be called "brent_find_minimum" since it finds a single minimum, IMHO. The singular is minimum in Latin, minima is the plural. Or can the function be called repetitively and each time return a different minimum??

Frank
fastier_at_[hidden]



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net