Re: Let's gather some evidence!
On Thu, Sep 10, 2009 at 6:32 AM, Arnold Neumaier
<Arnold.Neumaier@xxxxxxxxxxxx> wrote:
> John Pryce wrote:
>
>> - How do you envisage "returning more information besides an interval"
>> being implemented? If it is by the mechanism of an extra output argument, so
>> c = a + b becomes c = plus(a,b,flag) as I believe is the scheme in the draft
>> C++ interval standard, how should one remedy the huge inconvenience to the
>> user, who has to rewrite existing function code?
>
>
> With two datatypes, one for decorated and one for undecorated
> intervals, this is easy.
>
> Expressions like x=a+b can still be interpreted as before - if a,b are
> undecorated intervals, the result will be undecorated, if they are
> decorated intervals the result will be decorated.
>
> Alternatively, one could use compiler directives that tell how a given
> block of code is to be treated, the default being using no decorations.
If the compiler directive is not required by the programming language
then we have only succeeded in creating opportunities for non-portable
codes and more confusion.
If the directive is to be required by the programming language, then we
have succeeded in throwing more blocks of resistance to adopt the
interval standard.
We seem to be underestimating the value of simplicity.
>
> Automatic detection of what is needed is also a possibility.
>
>
> Arnold Neumaier
>