MidRad to/from InfSup (was: the "set paradigm" is harmful)
Oishi:
>>> set round up
>>> m=0.5*(l+u)
>>> r=m-l
Arnold (revised):
>> I think the formula that should be in the standard is
>> set round up
>> m=l+0.5*(u-l);r=m-l
>>
>> In binary arithmetic, or when intermediate results are kept to
>> higher precision, the two formulas appear to be equivalent.
Siegfried:
>Given this last remark, I suggest to use Oishi's proposal
>at least for binary arithmetic:
Things are not quite that simple; we also have to worry about edge
cases. Unbounded InfSup cases need to be handled separately (Arnold
proposes that the "midpoint" be the smallest-magnitude member of the
interval, the radius being +Infinity), but we also have to worry about
overflow in u+l, which Arnold's revised formula mostly avoids. There
can be overflow in (u-l) too, but in that case the radius computation
would overflow too. Consider conversion of [Max, ulp-Max], whose true
midpoint is (representable) ulp/2 (of a Max-sized value), but the
corresponding radius would be Max+ulp (not representable), so one would
have to return m=0, r=Max instead (aka Entire).
Michel.
P.S. I just realised that Arnold's rule for strictly one-signed unbounded
intervals leads to an entire family of Entire MidRad intervals with
the same infinite radius, but different "midpoints".)
Is there any agreement in the MidRad community for dealing with
overflow and/or unbounded intervals?
Sent: 2009-02-12 15:32:57 UTC