Re: formatOfMidpoint()
Vincent
On 13 Feb 2012, at 10:05, Vincent Lefevre wrote:
> On 2012-02-11 16:20:06 -0500, Michel Hack wrote:
>> It seems obvious to me that if a midpoint is not representable in the
>> target format, the result should simply be NaN. I'm using the minimal
>> definition of midpoint here: an interior point.
>
> This is not very clear. I think that a Level-2 midpoint (i.e. as an
> element of some number format F) must be an element of the interval,
> else it is NaN. If possible, it should be an interior point.
>
> If can be interesting to introduce a notion of a number format F
> "compatible" with an interval type T. The conditions could be:
> * For each x in F, [x,x] is an element of T.
> * Each non-empty interval of T must contain an element of F
> (or, equivalently, a point interval of T).
>
> In particular, for such a number format, it is possible to define
> a midpoint operation such that the Level-2 result (element of F)
> is in the interval. Not sure whether it should be required that
> such a number format necessarily exists, specially if you want to
> allow:
>
>> This might also be the case for some of the off-center implicit-format
>> examples, where the issue is not range but precision: if the Level 1
>> interval is entirely between two representable target-format values,
>> then there is no representable midpoint, and the result should be NaN.
Thanks! Your "compatible" idea is exactly the sort of thing I had in mind in my recent email on "adequate and inadequate" number formats. Folk, let's work further on this.
John