pub fn two_sum<T>(a: T, b: T) -> (T, T)
Expand description
Calculates floating-point sum and error. The 2Sum algorithm.
a
,b
the floating-point numbers to add.
returns (a + b) and the floating-point error: $t = a + b - (a \oplus b)$
so: $a+b=s+t$.