Exception handling
Hi,
The standard draft needs to say a few words about status, exceptions,
and their handling. I intend to work on it starting August 20th. If you
have comments regarding this matter, please contact me.
I can think of three points that need wordings:
1. Should interval operations signal things?
2. Can exceptional situations be encountered and how should this
information be conveyed to the user?
3. How does IEEE-1788 interact with IEEE-754 exception handling?
Are there some other points that need to be specified?
For point 1, my opinion is that the IEEE-754 flags (e.g. inexact,
underflow) do not make much sense for interval arithmetic. And decorated
intervals seem to carry enough information, so it seems we do not need
any kind of status.
For point 2, at least with the set-based flavor of intervals, there are
not many things that can go wrong. Basically, the only ones are
operations that create intervals from non-interval data, e.g. I/O. We
have to decide what to do in that case; there are several options. This
might be left unspecified. There might be exception signaling à la
IEEE-754. There might be some specific interval value, e.g. the empty
interval for the non-decorated case. Or it might be wording akin to
"language standards should define, and require implementations to
provide, means for the user to detect and act upon failures". (For
instance, the C and C++ standards have already such mechanisms when it
comes to I/O.)
For point 3, my opinion is that interval operations should not signal
any IEEE-754 exceptions. Not signaling them might be inefficient for
lots of implementation, that is why it would only be "should", but with
the idea that they should be separate subsystems. You can think of the
"mayRaiseFlag" mode of IEEE-754 as a way to implement it.
Best regards,
Guillaume
PS: Regarding point 2, if you intend to standardize another flavor of
intervals that would require a lot more of exception handling, please
contact me.