|
Boost Users : |
Subject: Re: [Boost-users] Issues with brent_find_minima
From: John Maddock (boost.regex_at_[hidden])
Date: 2011-08-14 07:03:55
>The fourth argument should be an integer specifying the number of bits
>of precision you want (not a float-tolerance).
>This seems to work:
>http://codepad.org/Myd5Th7W
>I get:
>x=4 f=-2.61457
>x=3.42864 f=-3.28835
Correct, the final argument is an integer - the number of bits precision -
so your code was asking for 0 bits precision which is why it just returned
the starting value!
BTW your compiler should have warned about the conversion from double to
int, which is a big hint that something is wrong ;-)
HTH, John.
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