Boost logo

Boost :

From: boost (boost_at_[hidden])
Date: 2001-04-24 16:29:26

On Tuesday 24 April 2001 19:19, you wrote:

> > You will need just one function call to check if x has a
> > zero in the interval -1..1:
> > if f( interval<double>(-1,1) ) contains no zero then it is proven that
> > there is no zero.
> But isn't that just a matter of redefining the problem away?
> When you write f(interval<double>(-1, 1)), what you really mean
> is "the ordered pair (a, b) such that a is less than or equal
> to f(x) for all x in [-1, 1] and b is greater than or equal to
> f(x) for all x in [-1, 1]".
> Certainly if you find such an (a, b), and if you know that f
> is continuous, then you know whether or not f has a zero in
> [-1, 1]. But you've turned a root-finding problem into a
> minimax problem, which isn't necessarily easier.
o.k., I assumed that f is continuous, but I can just bisection
the inteval and check [-1,0] and [0,1] for zeros. Maybe the
example is not so great, but the method works even for
'ugly' function which have zeros due to some small dips.

Best wishes,

Boost list run by bdawes at, gregod at, cpdaniel at, john at