[std-interval] interval(NaN)

Gabriel Dos Reis gdr at integrable-solutions.net
Wed Sep 20 16:49:57 PDT 2006


Guillaume Melquiond <guillaume.melquiond at ens-lyon.fr> writes:

[...]

| Now, the proposal flags some behaviors as undefined.

I'm not sure that is the best answer and I'm not sure I agree with it.
And it would be a good thing if you could address that point *before*
the Portland meeting. 

[...]

| Now, back to the main problem. Where should the invalid floating-point
| values be detected? I don't think every function should pay this (not
| necessarily negligible) cost for checking the values. In particular, we
| still need a way for the programmer to quickly create an interval when
| the values are known to be valid. This was the point of leaving
| interval(T,T) partly undefined.

If all your operations are guaranteed to deliver valid intervals when the
inputs are valid intervals, then the only place where you can get
non-sensical intervals is at construction time.  Constructors are
provided by the language to set up invariants.

-- Gaby


More information about the Std-interval mailing list