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

Re: An error-catching question



Iam Mcintosh wrote:
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.

Ian,

This already exists. Motion 8 calls it a "bare decoration".

I believe this is what Arnold was referring to, i.e., once a decorated
interval is constructed, either the interval portion can be thrown away
leaving only a bare decoration (NaI), or else the decoration portion can be
thrown away leaving only a bare interval (empty set).



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.


Don't forget the third option:

some will use bare (undecorated) intervals until an exception occurs, and
then propagate only a bare decoration (NaI).

This is typically the case in branch-and-bound interval algorithms, for
example, where using decorated intervals for all computations is a huge
waste: as long as no exception occurs, then bare intervals are all the
algorithm needs. As soon as an exception occurs, however, the algorithm no
longer needs any bare interval and only requires a bare decoration (NaI) to
progpagate through the rest of the computation.


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.


Agreed!

Nate



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



|------------>
| 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