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

Re: Let's gather some evidence!



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.

Automatic detection of what is needed is also a possibility.


Arnold Neumaier