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

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