Thread Links | Date Links | ||||
---|---|---|---|---|---|
Thread Prev | Thread Next | Thread Index | Date Prev | Date Next | Date Index |
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 |