−All four approaches give count=7, sum=87.00, max=41.00. This Combine is also commutative, so the order in which PLINQ merges partition results does not matter. The PLINQ Aggregate documentation's Remarks do not specify that merge order, making this unsuitable as-is for an order-sensitive operation. Averaging averages is not associative, but count and sum are, so compute the average once at the end. The example does not handle decimal sum overflow or amounts in different currencies.
+All four approaches give count=7, sum=87.00, max=41.00. Every intermediate sum for these inputs is represented exactly, so regrouping and reordering with Combine leaves the result unchanged, but using decimal does not guarantee associativity for all amounts. Adding 10^28, -10^28, and 0.01 from the left gives 0.01; grouping the last two first gives 0 because of rounding, without overflowing. The PLINQ Aggregate documentation's Remarks do not specify the partition merge order, so parallel aggregation needs operations that are associative and commutative for the actual inputs. Compute an average once from the accumulated count and sum instead of averaging averages, keeping the intermediate counts and sums within a range where they are represented exactly. This example has no decimal overflow checks or distinction between currencies.