more Re: [std-interval] list of functions for intervals
R. Baker Kearfott
rbk at louisiana.edu
Mon Jun 5 15:43:25 PDT 2006
At 09:16 PM 6/5/2006 +0200, Guillaume Melquiond wrote:
>Le lundi 05 juin 2006 à 12:05 -0500, R. Baker Kearfott a écrit :
>> What if, in your example below, R contains two disjoint segments
>> of points r such that cos(r) \in R? Would you return the interval
>Yes, the result is an interval and it contains all the values matching
>the relation, so that the result does not lie. But I don't see this
>truth as an issue. Indeed, lots of interval applications tend to split
>their domain into sub-domains if the results they have computed are not
>precise enough. In that case, they will get to a point where the various
>Rs contain only one single contiguous interval.
>> In fact, R could possibly contain an arbitrary number of
>> such segments. Thus, acos_rel does give additional utility for
>> constraint propagation, but can't give the exact cset in all cases.
>Right, but this is a proposal for interval arithmetic, not for arbitrary
>set arithmetic. Having acos_rel([0,1], [-inf,inf]) return an infinite
>set of implicitly defined intervals is possible but it goes well beyond
>what we want to propose here.
I agree fully with the above choice. I have previously thought
a bit about arbitrary set arithmetic, and am of the opinion that
it is more complicated than something we want to standardize at
>And obtaining the "exact" cset is anyway out-of-reach because of bounds
>rounding. As a matter of fact, this rounding phenomenon is why I'm not
>really fond of cset intervals when they have floating-point bounds (I'm
>only speaking for myself here). For example, it means that multiplying
>four intervals containing positive and finite numbers can lead to an
>interval containing negative values. But I'm digressing.
Picking up on your "digression," I don't see how multiplying four positive
intervals and getting an interval containing negative numbers as
a result is related to cset arithmetic. Isn't this related to
the definition of interval multiplication, which, for finite intervals,
is the same as the old-fashioned definition of multiplication
of intervals? That is, isn't this a quality of implementation issue?
(Lower bounds that are positive but rounded down should be rounded
down to exactly zero, and a result that is exactly zero shouldn't
be rounded down. Isn't that what IEEE-754 does?) Otherwise, are
you thinking of an example with infinite end points that I missed?
>> Also, I note that Lee's "twin" idea, if I understand it correctly,
>> doesn't handle the case with more than two disjoint intervals in the
>> cset. At some point, I'm guessing that we need to accept what
>> Lee calls "white lies" in some cases, and design a standard that is
>> a good balance between simplicity and utility in a wide variety
>> of applications.
>Note that Lee's twin idea is fundamentally different from the idea I
Yes, it is different, for a different purpose.
>First, it only applies to atan2 with respect to trigonometric
>functions. For example, there is no meaning in a twin version of acos
>since the set extension of acos only returns intervals when it is fed
>with intervals. Second, the result of the twin version of atan2 is
>constrained to [-Pi,Pi] while cosine and sine on the whole real line.
>I'm not saying that the twin idea is a bad idea. As a matter of fact we
>have used it for the division in the Boost library, and I still think it
>was a good idea. I'm just saying that this is not what people doing
>constraints programming are expecting in my opinion. But this could be
>useful for other people.
Yes, I understand the use of the acos_rel function in constraint
propagation. I also think I understand that Lee's idea is to extend
all floating point functions in a natural way, using the classically
restricted domains of the inverse trig functions.
R. Baker Kearfott, rbk at louisiana.edu (337) 482-5346 (fax)
(337) 482-5270 (work) (337) 993-1827 (home)
Department of Mathematics, University of Louisiana at Lafayette
(Room 217 Maxim D. Doucet Hall, 1403 Johnston Street)
Box 4-1010, Lafayette, LA 70504-1010, USA
More information about the Std-interval