Re: Edge case conversions, exceptions to IEEE FPA
Siegfried M. Rump schrieb:
Van Snyder schrieb:
On Fri, 2008-11-07 at 08:50 -0800, Arnold Neumaier wrote:
This is why I had proposed to convert
+inf into the interval [realmax,realmax],
-inf into the interval [-realmax,-realmax],
NaN into the interval [0,0]
I find myself defending a mere suggestion before it has been commented
on by Siegfried, who
The reason would be to ensure that mixed computations with floats and
nonempty intervals always give nonempty intervals. This is a
reasonable though debatable requirement; I'd prefer to convert bad
floats to Empty.
Arnold, I understand your point of view, so it seems we agree to disagree.
As I wrote before there is a difference in quality for me in the (small)
error we
perform in intval(.1) and moving intval(1e400) into empty.
It is a matter of interpretation; yours is the set of extended reals
(including inf)
Mine is the set of nonextended reals, to which inf does not belong,
so it is converted to empty.
My interpretation of the input inf is a huge number, so that
1e400 * intval(0)
yields [0,0] while your definition yields the empty set.
Both interpretations are consistent, one has to be chosen.
Then I take back my compromise suggestion and stick to my original
proposal to convert +-inf and NaN to empty. I find this the only
consistent approach.
There is no need to convert 1e309 to a correct enclosure when
1e308 is converted to an interval not containing it.
The fact that a subsequent multiplication by zero makes a difference
is too marginal to require an interpretation of inf different from
its face value.
Arnold Neumaier