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

Re: Alternate floating-point results under directed rounding



Arnold Neumaier wrote:
Nobody had suggested that. The question is only whether a
floating-point +-inf or NaN should be converted into Empty,
or into a substitute finite point interval, or into a substitute
interval of positive width.

Can't it be made an error?
I am not sure how to properly word this in the standard, but for
example one could define "undefined behavior", or raise some error flag...?

If we return an interval from Inf or Nan, then the whole R interval
[-inf,+inf] is IMO the only one which can offer some guarantee.
But then, of course, one might think that the following computations
with such an interval are probably useless, and it might be best to
take this as an error as soon as possible, or leave it "undefined behavior"
to not force the performance penalty of checking the error case if
we think it is worth supporting a fast mode here.

[+maxreal,+inf] seems inconsistent to me here, since, if the goal is to
try to somehow recover from a value that overflowed, then there is
no guarantee that this value would have been in [+maxreal,+inf].
For example if the value +inf comes from the computation of
(+maxreal + 1) - 2.
(since +maxreal + 1 gives +inf, and then +inf - 2 gives +inf,
but the exact value is +maxreal -1).


FYI : "undefined behavior", as defined by C++, is what has been chosen
     for the C++ interval standardization proposal, at least so far,
     to cope with this issue.

--
Sylvain Pion
INRIA Sophia-Antipolis
Geometrica Project-Team
CGAL, http://cgal.org/

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature