title: How can I add floats together in different orders, and always get the same total?
body: <p>Let's say I have three 32-bit floating point values, <code>a</code>, <code>b</code>, and <code>c</code>, such that <code>(a + b) + c != a + (b + c)</code>. Is there a summation algorithm, perhaps similar to <a href="http://en.wikipedia.org/wiki/Kahan_summation_algorithm" rel="noreferrer" title="Kahan summation">Kahan summation</a>, that guarantees that these values can be summed in any order and always arrive at the exact same (fairly accurate) total? I'm looking for the general case (i.e. not a solution that only deals with 3 numbers).</p>
  
  <p>Is arbitrary precision arithmetic the only way to go? I'm dealing with very large data sets, so I'd like to avoid the overhead of using arbitrary precision arithmetic if possible.</p>
  
  <p>Thanks!</p>