Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

Fw: A question Level 1 <---> level 2 mappings; arithmetic versus applications



Nate Hayes> Possibly semi-infinite intervals can be considered invalid construction for
Nate Hayes> mid-rad types, similar to how [-Inf,-Inf] is invalid construction for
Nate Hayes> inf-sup.

It is possible to represent some semi-infinite intervals precisely with mid-rad, and others more precisely than entire.
For the particular case of [0, +oo], one option would be mid=maxfinite and rad=mid, but maybe a better one would be mid=maxfinite/2 (rounded up) and rad=mid.
For [>0, +oo], use something like mid=inf+( (maxfinite-inf)/2 rounded up) and rad=maxfinite-inf/2 (rounded up). That would almost always be an overestimate, sometimes a huge one, but never worse than [0, +oo] so never as bad as entire.

I think the important points are that with mid-rad you should treat semi-infinite intervals specially, and that many will be vastly overestimated.

Normally I'd prefer a value equivalent to [0, +oo] (if I was using decorated intervals, with a decoration telling me it had ballooned) than having my program terminated for producing an illegal interval. I might even write code to check for such results and recalculate using inf-sup intervals to see if the range can be refined. (C++ templates can be handy here, making it easy to write the same code using a different data type.) I expect some others would prefer termination. Some environments might offer the option of logging the problem and continuing, or interacting to ask what to do.

- Ian McIntosh IBM Canada Lab Compiler Back End Support and Development

----- Forwarded by Ian McIntosh/Toronto/IBM on 06/30/2010 05:35 PM -----


From:

Nate Hayes <nh@xxxxxxxxxxxxxxxxx>

To:

Ian McIntosh/Toronto/IBM@IBMCA

Date:

06/30/2010 04:42 PM

Subject:

Re: A question Level 1 <---> level 2 mappings; arithmetic versus applications





Yes.
Possibly semi-infinite intervals can be considered invalid construction for
mid-rad types, similar to how [-Inf,-Inf] is invalid construction for
inf-sup. So there may be connections to the exception handling mechanism for
these cases.
Nate

----- Original Message -----
From: "Michel Hack" <hack@xxxxxxxxxxxxxx>
To: "stds-1788" <stds-1788@xxxxxxxxxxxxxxxxx>
Sent: Wednesday, June 30, 2010 3:25 PM
Subject: Re: A question Level 1 <---> level 2 mappings; arithmetic versus
applications


> Nate Hayes wrote:
>> For example, any given Level 1 interval [a,b] has the property:
>>     [a,b] = (m;r)
>> where (m;r) is a mid-rad interval and m=(a+b)/2, r=(b-a)/2.
>
> Any *bounded* Level 1 interval.  At level 1 a+b and a-b don't exist
> when either a or b is infinite.  At level 2 the only possible mid-rad
> result is Entire, which loses almost all information unless the level 1
> interval was Entire too (in which case a+b does not exist at level 2,
> so a special rule would be followed).
>
> Michel.
> ---Sent: 2010-06-30 20:31:49 UTC
>