[std-interval] list of functions for intervals

Guillaume Melquiond guillaume.melquiond at ens-lyon.fr
Mon Jun 5 16:52:58 PDT 2006


Le dimanche 04 juin 2006 à 00:30 +0000, first.i.last at comcast.net a
écrit :

> The attached document is a summary aimed at raising issues and
> identifying areas meriting additional discussion rather than a
> comprehensive specification with endless detail but no rationale.
> Therefore readers who are only concerned with concrete suggestions
> should not read it.

If I correctly understand your document, you have extended the atan2
function as three interval functions. For Y=[-1,1] and X=[-2,-1], they
will answer:

        twin_atan2  => [-Pi,-Pi/2] | [Pi/2,Pi]
        atan2_sharp => [Pi/2,3Pi/2]
        atan2_blunt => [-Pi,Pi]

In our current proposal, we have preferred to provide less functions yet
be more generic; this idea was inspired by interval arithmetic libraries
like gaol. First there is an atan2 function which is the natural
interval extension, namely your atan2_blunt function. Second there is a
relational function atan2_rel defined as:

        atan2_rel(Y,X,R) contains { r in R ; cos(r) in X and sin(r) in
        Y }

Because of its two arguments, the atan2 example may not be the clearest
one. So let's consider the acos function instead.two interval functions
are defined:

        acos(X) contains { acos(x) ; x in X } = { r in [0,Pi] ; cos(r) in X }
        acos_rel(X,R) contains { r in R ; cos(r) in X }

Note: if Pi was exactly representable by a floating-point number, only
one function would be needed. The result of acos(X) would be defined as
acos_rel(X,[0,Pi]).

Why provide this function acos_rel? Because it is needed when doing
global optimization and constraints programming. Indeed, after doing
some forward and backward propagations, you usually come to the point
where you have an equality "b = cos(a)" and constraints "a in A" and "b
in B". Then you can compute improved constraints:

        B' <- intersection(cos(A), B)
        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].

Best regards,

Guillaume



More information about the Std-interval mailing list