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

Re: Accuracy of cancellative addition and subtraction



On 2014-06-17 16:56:41 +0200, Marco Nehmeier wrote:
> cancelMinus(x, y):
>     if (is_unbounded(x) || is_unbounded(y))
>         return ENTIRE;
> 
>     if (is_empty(x))
>         return EMPTY;
> 
>     if (is_empty(y))
>         return ENTIRE;
> 
>     // wid(x) < wid(y) using error free transformations
>     (x1,x2) = twoSum(x_upper, -x_lower);
>     (y1,y2) = twoSum(y_upper, -y_lower);
[...]

What if there is an overflow in twoSum (e.g. on [-Max,Max])?

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)