) + g(x2) + ...</code></pre>
<p>Mathematically the summation reduction is associative and forming arbitrary partial sums in an aribitrary order will not change the result. However, floating point numerics on computers only have a limited precision such that associativity does not hold exactly. This implies that the order of summation determines the exact numerical result. For this reason, the higher-order reduce function is available in two variants:</p>
<ul>
<li><code>reduce_sum</code>: Automatically choos