Baker Kearfott wrote:
Arnold et al,
On 05/10/2012 05:17 AM, Arnold Neumaier wrote:
But this midpoint is useless. Your bisection algorithm will
spend most time exploring a tiny neighborhood of infinity.
Ah, yes. That is certainly a valid point of view if the
function, say, has a limit or a solution at infinity; in
such cases, the best solution to the user's problem
might be for the person posing
the problem to map the domain into a finite, closed
interval, with one end point corresponding to infinity.
In that context, bisecting a semi-infinite interval at
MAXREAL is like producing an interval whose end points
are consecutive floating point numbers.
When I run a plain-vanilla midpoint bisecton algorithm on the function
f(x) = sin(1/x)
on the interval domain X = [.1,+omega] it finds all four solutions
(including the solution at infinity)
X mid(X) F(X) wid(F(X))
================= ======= ================= =========
[1.7977e+308, 1.#INF] 1.7977e+308 [ 0,5.5627e-309] 5.5627e-309
[0.31094,0.31875] 0.31484 [-0.074419,0.0043377] 0.078757
[0.15469, 0.1625] 0.15859 [-0.12898,0.18047] 0.30945
[ 0.1,0.10781] 0.10391 [-0.54402,0.14886] 0.69288
Total bisections: 1038
There may be more complicated ways to improve efficiency, but these
algorithms with midpoint are very simple and the performance is pretty
good.