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

Re: midpoint



P1788

Am 07.03.2012 16:00, schrieb Ulrich Kulisch:
Dear P1788 members:

P1788 considers intervals of \overline{IR}, the set of closed and connected sets of real numbers. In mathematics the midpoint of an interval is well defined for elements of the set IR, the set of nonempty, colsed and bounded real intervals.

During the last 12 months the question was discussed whether and how the midpoint should be defined for elements of the set \overline{IR}\IR. I have great sympathy with Dan's resistance of returning NaN in these cases. First of all, this answer may be wrong. Think of an interval of IR where the lower and the upper bound are greater than Fmax. This interval has a real number as its midpoint. It is just not compubable within the given floating-point system. An answer like "not calculable" or perhaps "indefinite" (a native English speaking colleague may find a better denotation) seems to me being more appropriate. Second: Arithmetic of \overline{IR} is strictly based on mathematical grounds and it is free of exceptions. So elements of IEEE 754 like NaN which are more of a speculative nature should not unnecessarily be introduced into P1788.

Now, the question remains, how should the midpoint of elements of \overline{IR}\IR be defined? I think there is no need at all defining it within P1788. We also don't give a definition of the logarithm for negative numbers. If a user has a reasonable application where he needs a splitting point for an unbounded interval or the empty set we should let him the freedom defining it in a way that is appropriate for his application. We don't need this definition in the standard.

I think that is a good idea and in full accordance with the definition of the interval functions where 1/[0,0] is not defined.
That is the level 1 view.
at level 2 we have to specify a value for any interval in \overline{IR} \IR
I support to return NaN. IMO there is no other choice for the emptyset.
For unbounded intervals  returning +oo or -oo could keep some information about the sign.
But I don't think it is worthwhile the effort.
In this case, as Vincent says, the main purpose is to inform the attentive user
Juergen
-- 
-                Prof. Dr. Juergen Wolff von Gudenberg 
     o           Lehrstuhl fuer Informatik II
    / \          Universitaet Wuerzburg, Am Hubland, D-97074 Wuerzburg
InfoII o         Tel.: +49 931 / 31 86602 Fax ../31 86603
  / \  Uni       E-Mail:wolff@xxxxxxxxxxxxxxxxxxxxxxxxxxx
 o   o Wuerzburg