[std-interval] list of functions for intervals

Guillaume Melquiond guillaume.melquiond at ens-lyon.fr
Tue May 30 22:11:13 PDT 2006


Le mardi 30 mai 2006 à 10:57 -0700, Lawrence Crowl a écrit :
> On 5/28/06, Sylvain Pion <Sylvain.Pion at sophia.inria.fr> wrote:
> > - fmin, fmax : we propose to return interval<T>, while we could
> >    return double (the lower or upper bound), but we choose the
> >    consistency with the treatment done to other functions, and
> >    it is easy to extract the lower/upper bound of the resulting
> >    interval anyway.
> 
> How do you propose to define this interval? It is not clear to me.

The fmin(interval<T>,interval<T>) function is defined as the interval
extension of the fmin(T,T) function (so this is consistent with every
arithmetic operator of the proposal).

Mathematically, Min(X,Y) = { min(x,y) | x in X, y in Y }.

>From an implementation point of view, this means that if X and Y are not
empty, the result is
  [ fmin(X.lower(), Y.lower()), fmin(X.upper(), Y.upper()) ]

Best regards,

Guillaume



More information about the Std-interval mailing list