Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

mid(u,u)? Re: How do I bisect unbounded intervals?



If "u" is a representable endpoint of an interval (e.g. if
the underlying representation is "infsup" and u is a valid
floating point datum), it seems to me a reasonable representation
is mid([u,u]) = u.  (Mathematically, that is exactly the
midpoint.)  Of course, this doesn't prevent infinite
recursion if the programmer hasn't taken account of it.  I grant
you that this case is similar to the case [u,v], where u and v
are adjacent representable floating point numbers (a case that
Nate has suggested should return NaN), but in the case [u,v],
case, it is not possible for the "mid" function to return
an exact result. (That case is not unique: u and v don't need
to be adjacent for the midpoint not to be representable.)
IMO a minimal requirement for the case [u,v]
would seem to be that "mid" return an element of [u,v].  (A stronger
requirement might be it return "NaN" in the case there are no
floating point numbers between u and v.)

Baker

P.S. I hope I'm not being too sarcastic here, but some of our
     reasoning makes me wonder if we can stop all wars and
     end poverty and oppression worldwide as a byproduct.

On 01/12/2012 09:18 PM, Nate Hayes wrote:
Vincent Lefevere wrote:
On 2012-01-13 03:13:24 +0100, Vincent Lefevre wrote:
On 2012-01-13 03:11:28 +0100, Vincent Lefevre wrote:
.
.
.
Hmm... The case [u,u] has been forgotten. What would the spec be?
Can this happen in B&B algorithms?

If midpoint([u,v]) = NaN when u and v are adjacent Level 2 datums, then I
can't really think of any way to obtain [u,u] in B&B unless this is the
initial input provided by a user (that would be rather silly, but I suppose
this could happen).

Returning NaN for midpoint([u,u]) may still be safest, anyways: in general
the interval extentsion f([u,u]) is likely have some interval width and this
could still cause a naive B&B algorithm to try and bisect [u,u] leading
again to a state of infinite recursion.

From a mathematical perspective if we define the natural domain of the
midpoint operation to be all Level 2 intervals [u,v] such that there exists
some Level 2 datum m
u < m < v,
then returning NaN for midpoint([u,u]) would make sense because [u,u] is not
in the natural domain of the operation.

Nate