1function [s, t] = sumx(u, v) 2%SUM Error free sum 3% 4% [s, t] = SUMX(u, v) returns the rounded sum u + v in s and the error in 5% t, such that s + t = u + v, exactly. u and v can be any compatible 6% shapes. 7 8 s = u + v; 9 up = s - v; 10 vpp = s - up; 11 up = up - u; 12 vpp = vpp - v; 13 t = -(up + vpp); 14end 15