[std-interval] Comments on the Interval Standard Proposal

Guillaume Melquiond guillaume.melquiond at ens-lyon.fr
Mon Oct 2 12:30:54 PDT 2006

Le lundi 02 octobre 2006 à 10:34 +0200, Gabriel Dos Reis a écrit :

> | Now we are back to these two questions. What behavior do we mandate for
> | constructors on infinities and NaNs? Do we leave some undefinedness so
> | that libraries can do assumptions on the finiteness of the
> | floating-point values for mixed-type operations and perform fast
> | computations? (If not, the behavior would obviously be mandated to be
> | the same as with constructors.)
> As I said earlier, I would like to see the number of undefined
> behaviour close to zero.  Consequently, either you specify the
> operations to deal explicitly with NaNs, or you ban NaN inputs and
> therfore make sure that no interval is constructed with NaNs.

What do you mean by "ban NaN inputs"? Does that mean putting a
"Requires" paragraph on operations that have floating-point arguments?
This can't be what you mean as this would just be a case of undefined
behavior on broken precondition. Unless mandating the operations to
throw an exception, but then this means dealing explicitly with NaNs.
Sorry, I don't understand the alternative you are speaking about. To me,
it's still: either we require a behavior on non-finite inputs, or we
leave it undefined. And if we require a behavior, what do people want?
Empty set? Whole Set? Almost infinite sets (for infinities)? Exception?
Other behavior?

Best regards,


More information about the Std-interval mailing list