Thread Links | Date Links | ||||
---|---|---|---|---|---|
Thread Prev | Thread Next | Thread Index | Date Prev | Date Next | Date Index |
Arnold Neumaier wrote:
I can't see how you'd implement your formula with Overflow more efficiently than Rump implemented the treatment of Inf.Will you please show me the source code of how Rump does this?How he did it in version 5.0 is appended to the end of this mail. But the code looks quite ugly since he does the real case and thecomplex case and the vector-valued case simultaneously, and also has overloading by real numbers and complex numbers/intervals as part of the procedure. The essential part for real intervals is:setround(-1) c.inf = min( a.inf .* b.inf , a.inf .* b.sup ); c.inf = min( c.inf , a.sup .* b.inf ); c.inf = min( c.inf , a.sup .* b.sup ); setround(1) c.sup = max( a.inf .* b.inf , a.inf .* b.sup ); c.sup = max( c.sup , a.sup .* b.inf ); c.sup = max( c.sup , a.sup .* b.sup );It works correctly except for the case when a and b are [0,0] and Entire (in some order), where the Intlab result is (wrongly) [NaN,NaN] ratherthan [0,0]. The code can easily be fixed (for scalar intervals) by appending if isnan(c.sup), c.inf=0;c.sup=0; end;Easy to write in code, I agree. But notice this puts a branch into the code to detect what typically will be quite a rare case. The branch needs to be tested and executed for every interval operation, though. This can lead to big performance loss.Suppose that Entire was produced by [0,0]/[0,0], so that it does _not_ represent a bounded interval. How would your Overflow solve this more efficiently?As I have said, the exact use and definiton of Overflow for P1788 depends on other questions that have yet to be voted on. So the answer could depend on many variables which have not yet been settled.Please pick the most favorable context and show how it is doen there. Then one can discuss its merits.As controversial as it may be, more and more I believe Motion 3 is too liberal in allowing unbounded intervals. Overflow makes things more efficient because P1788 then no longer has to deal with special case disctinctions between when the result is known to overflow and be unbounded vs. when the result is known to overflow and be bounded.How would you then represent the interval defined by the bound constraint x>=1 in a linear program?Nothing overflowed, x can be any real number >=1.
If it is a constraint, then as I mentioned just last night 1 <= Xwill always be true for non-empty X with the lower bound greater-or-equal to 1. THis is all that's needed to program the constraint.
Nate