# [std-interval] Comments on the Interval Standard Proposal

Gabriel Dos Reis gdr at integrable-solutions.net
Sun Oct 1 01:58:58 PDT 2006

```Sylvain Pion <Sylvain.Pion at sophia.inria.fr> writes:

| Guillaume Melquiond a écrit :
| >> 26.6.4 interval member functions
| >>
| >>    whole();
| >>
| >>       I do not see a definition of the static member function whole().
| >>       I am particularly interested in what whole().lower() et.al. means.
| > There is a definition in the proposal saying that "whole" returns
| > [-inf,
| > +inf]. Anyway, there was some discussions on the list and now "whole" is
| > only defined as returning an interval containing all the real numbers.
| > There is no difference with the older definition for a 754-based
| > efficient implementation, but the function can now be defined on an
| > arithmetic without infinities.
| > Concerning the "lower" and "upper" members, I have fixed their
| > definitions along the lines of the "inf" and "sup" functions, so that
| > they return the corresponding infinities for unbounded intervals. When
| > infinities are not available, the behavior is implementation-defined.
|
| For implementations which do not support infinity, how do you check if
| an interval is bounded ?  Currently we can't.

Hmm, I'm unclear about this one.  If the implementation does not
support infinity, does not it follow all intervals are bounded?

| What about adding functions like:
|    is_positively_bounded(interval<T>), and
|    is_negatively_bounded?
| Or something like that.
|
| Even for cases where infinities are supported, they can be more
| convenient than testing like:
|    x.upper() == numeric_limits<double>::infinity()

Yes.

-- Gaby

```

More information about the Std-interval mailing list