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

Re: Edge case conversions, exceptions to IEEE FPA



Further thinking about this, I am now of the opinion that
intval(1e309) = Empty  is not safe enough.
Arnold's proposal mentions an accompanying error flag, but also the sentence
"I expect that the flag will never be inspected", with which I agree.

I would definitely prefer it to return Entire.
At least this way, the basic containment property is at the safest level,
while if you use Empty, an error could easily go undetected:

Take the example of an algorithm computing the hull of a bunch of floating-point
values.  The algorithm iterates over the values, converts them to interval,
and accumulates using hull().  If a floating-point value is 1e309 or +Inf,
and it gets converted to Empty, then it has gone unnoticed.

If you use Entire, you will get useless computations, which will force you to
look at the problem, but it will not go unnoticed.
But we already saw that every floating point computation can have arbitrary errors, so containment is in this approach never guaranteed. In this way the only correct result would be to convert every intval(x) to Entire. Suppose you don't have a 1e400 in your point collection but arbitrary errors in the finite values? In this case converting to [realmax, oo] would at least give you an enclosure of the floating point values---whether this is of use regarding the question of rigor, or not.

Cheers,
Christian

--
                             /"\
Christian Keil               \ /    ASCII Ribbon Campaign
mail:c.keil@xxxxxxxxxxxxx     X  against HTML email & vCards
                             / \