Here's the internal _sum function for example, which you can see maps _exact_ratio over the data before summing: https://github.com/python/cpython/blob/3.9/Lib/statistics.py...
>>> data = (1_000_000_000.1, 1.1) * 50_000 >>> statistics.fmean(data) 500000000.6
>>> import boltons.statsutils >>> data = (1_000_000_000.1, 1.1) * 50_000 >>> boltons.statsutils.mean(data) 500000000.60091573 >>> sum(data) / len(data) 500000000.60091573
Here's the internal _sum function for example, which you can see maps _exact_ratio over the data before summing: https://github.com/python/cpython/blob/3.9/Lib/statistics.py...