xsum_mean() divides the exact sum by the number of terms and rounds
once: the result is the correctly rounded value of the true mean, not
xsum(x) / length(x), which would round twice. Base mean() makes a
second pass to correct its first estimate, but its accumulator is still
platform-dependent.
Details
Special values follow the table in xsum(). The mean of no values is
NaN, as in base R. xsum divides by a 32-bit count, so a mean over more
than 2^32 - 1 terms signals a zuexact_count_error.
See also
Other means:
xsum_weighted_mean()