RoundToZero(+Inf) and Mid(semi-bounded interval)
Vincent Lefèvre replied to me:
> No, roundToZero does not apply to entire operations (this makes no
> sense), but to unrounded results. Here the unrounded result mid(X)
> is +inf, because at Level 1: ...
Well, IEEE 754 rounding DOES apply to entire operations. FormatOf()
operations and elementary functions are supposed to round only at the
end, when coercing a result to the target format.
But Vincent is right: if we compute mid() using the bounds as F-numbers,
then Dan's formula does lead to +Inf and not overflow, and hence rounding
would have no effect. My mental picture was that we were taking midpoint
of all values contained in the interval, which are all finite, in which
case we do have an overflow situation that would round down to Fmax in
the target format.
Now -- how can we rephrase Dan's mid() definition to reflect our intent?
Of course, if we follow Arnold Neumaier's approach instead this issue
would not arise. (For Arnold the unbounded intervals have NO midpoint,
or rather, no unique midpoint, so he suggests returning NaN.)
Michel.
---Sent: 2012-03-01 16:29:02 UTC