[std-interval] list of functions for intervals
guillaume.melquiond at ens-lyon.fr
Tue Jun 6 00:25:31 PDT 2006
Le lundi 05 juin 2006 à 17:17 -0300, Fernando Cacciola a écrit :
> Guillaume Melquiond wrote:
> > A' <- acos_rel(B, A)
> > If acos_rel was not available, the second assignation could be written
> > A' <- intersection(acos(B), A). But the set A' would then be wrong if
> > the initial sets were A = B = [-1,1].
> Hmm, I thought I understood the xyz_rel(X,R) functions to be precisely the
> equivalent of intersection(xyz(X),R), yet you explicetely state here that is
If they simply were some intersections, there wouldn't be much point in
adding these functions :-).
> not; but I can't follow: why would intersection(acos([-1,1]),[-1,1]) be
> wrong? That is, what exactly is the result of acos_rel([-1,1],[-1,1]) and
> how is that different from the explicit restriction to R?
When R is included in the domain of the reciprocal function and the set
intersection of the set result with R is contiguous, then both
expressions will have the same result. For acos_rel([-1,1],[-1,1]), the
intersection is indeed contiguous, but R is not included in the domain
(for acos it is [0,Pi]), so this will give different results:
intersection(acos([-1,1]), [-1,1]) = [0,1]
acos_rel([-1,1], [-1,1]) = [-1,1]
Indeed, the set of values x in [-1,1] such that cos(x) is in [-1,1]
(always true) is simply [-1,1]. This example may seem idiotic so let's
consider smaller intervals: what are the values x in [-0.2,-0.1] such
that cos(x) is in [0.99,1]?
The answer as a set is [-0.142,-0.1]. Since this is a contiguous set,
this will be the interval result given by acos_rel. On the other hand,
acos([0.99,1]) = [0,0.142], so the intersection would have given the
empty set (meaning that there is no solution, this is wrong). The
xyz_rel functions are meant as a tool to correctly solve (in)equations
involving trigonometric functions.
More information about the Std-interval