|
Boost Users : |
Subject: Re: [Boost-users] math tools roots
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2011-10-09 12:48:43
AMDG
On 10/09/2011 06:47 AM, Matwey V. Kornilov wrote:
>
> I believe that there is a bug in eps_tolerance implementation. At line 34 of
> toms748_solve.hpp one can see:
>
> return (fabs(a - b) / (std::min)(fabs(a), fabs(b))) <= eps;
>
> When both a and b equal zero this condition is evaluated to a false instead
> of a true. Left hand of condition is NaN and the right one is a floating-
> point number hence the result is false.
>
> Well obviously, a user wants to see true here because the relative length of
> interval in this case tend to zero.
>
What exactly do you mean by "the relative length of
the interval tends to zero?"
lim_{(a,b)->(0,0)} |a-b| / min(|a|, |b|)
doesn't exist.
In Christ,
Steven Watanabe
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