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

Re: An error-catching question



There's no point having undecorated intervals unless users can get correct answers with them. The purpose of decorations is to add more information about why value is what it is. All "values" including non-values like NaI need to be represented somehow in undecorated intervals. So there has to be an undecorated representation for Not An Interval, and a constructor that can produce it.

Obviously there also needs to be a decorated interval constructor able to produce a decorated Not An Interval. Some will use decorated intervals exclusively so will use that. Others will use undecorated intervals exclusively and miss out on some features they don't need (or don't think they need) but gain performance. Some will mix the two, either carefully or carelessly. Each will use what they think is best for their specific application, and a standards committee needs to consider all their needs. This is especially important to anyone who even dreams of replacing any current or future 754 usage.

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


Inactive hide details for Arnold Neumaier ---09/10/2010 06:01:20 AM---John Pryce wrote: > P1788Arnold Neumaier ---09/10/2010 06:01:20 AM---John Pryce wrote: > P1788


From:

Arnold Neumaier <Arnold.Neumaier@xxxxxxxxxxxx>

To:

Ian McIntosh/Toronto/IBM@IBMCA

Date:

09/10/2010 06:01 AM

Subject:

Re: An error-catching question





John Pryce wrote:
> P1788
>
> This doesn't mean I'm trying to catch you out. But, as I'm finalising a revision of a motion on the "defined and continuous" (actually, its negation) decoration bit I see a problem as follows.
>
> Nate Hayes has pointed out that good practice with decorated intervals ("dintervals") is: Use them sparingly. E.g. if you have one function f whose continuity must be checked, use dintervals inside the code of f, but bare intervals elsewhere.
>
> But, at present our only way to flag a wrong constructor call like "interval from 3 to NaN" is by setting a decoration (a value of the domain tetrit, in Hayes' scheme; or set the "illformed" bit, in mine). An interval thus decorated is to behave exactly like "NaI".
>
> A constructor for a bare interval can't do that. Briefly put
>     Dinterval(3,NaN)  can make a result that behaves like NaI.
>     Interval(3,NaN)  can't. So what _should_ it return?
>
> I can see various possibilities, none very satisfactory. Your solutions, please.

I think that a constructor should always produce a decorated interval,
and the programmer cvan then decide to throw away the decoration,
if desired (after querying the result, if needed).


Arnold Neumaier