<s>
2Sum	B-Algorithm
is	O
a	O
floating-point	B-Algorithm
algorithm	O
for	O
computing	O
the	O
exact	O
round-off	B-Algorithm
error	I-Algorithm
in	O
a	O
floating-point	B-Algorithm
addition	O
operation	O
.	O
</s>
<s>
2Sum	B-Algorithm
and	O
its	O
variant	O
Fast2Sum	B-Algorithm
were	O
first	O
published	O
by	O
Møller	O
in	O
1965	O
.	O
</s>
<s>
Fast2Sum	B-Algorithm
is	O
often	O
used	O
implicitly	O
in	O
other	O
algorithms	O
such	O
as	O
compensated	B-Algorithm
summation	I-Algorithm
algorithms	I-Algorithm
;	O
Kahan	O
's	O
summation	O
algorithm	O
was	O
published	O
first	O
in	O
1965	O
,	O
and	O
Fast2Sum	B-Algorithm
was	O
later	O
factored	O
out	O
of	O
it	O
by	O
Dekker	O
in	O
1971	O
for	O
double-double	O
arithmetic	O
algorithms	O
.	O
</s>
<s>
The	O
names	O
2Sum	B-Algorithm
and	O
Fast2Sum	B-Algorithm
appear	O
to	O
have	O
been	O
applied	O
retroactively	O
by	O
Shewchuk	O
in	O
1997	O
.	O
</s>
<s>
Given	O
two	O
floating-point	B-Algorithm
numbers	I-Algorithm
and	O
,	O
2Sum	B-Algorithm
computes	O
the	O
floating-point	B-Algorithm
sum	O
and	O
the	O
floating-point	B-Algorithm
error	I-Algorithm
so	O
that	O
.	O
</s>
<s>
The	O
error	O
is	O
itself	O
a	O
floating-point	B-Algorithm
number	I-Algorithm
.	O
</s>
<s>
Even	O
if	O
the	O
conditions	O
are	O
not	O
satisfied	O
,	O
2Sum	B-Algorithm
and	O
Fast2Sum	B-Algorithm
often	O
provide	O
reasonable	O
approximations	O
to	O
the	O
error	O
so	O
that	O
,	O
which	O
enables	O
algorithms	O
for	O
compensated	B-Algorithm
summation	I-Algorithm
,	O
dot-product	O
,	O
etc.	O
,	O
to	O
have	O
low	O
error	O
even	O
if	O
the	O
inputs	O
are	O
not	O
sorted	O
or	O
the	O
rounding	O
mode	O
is	O
unusual	O
.	O
</s>
<s>
More	O
complicated	O
variants	O
of	O
2Sum	B-Algorithm
and	O
Fast2Sum	B-Algorithm
also	O
exist	O
for	O
rounding	O
modes	O
other	O
than	O
round-to-nearest	O
.	O
</s>
