MCPcopy Create free account
hub / github.com/ActiveState/code / avgsum

Function avgsum

recipes/Python/265894_Floating_Point_Simulator/recipe-265894.py:55–56  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

53# Example: Compare numerical accuracy of three appoaches to computing averages
54
55def avgsum(data): # Sum all of the elements
56 return sum(data, F(0)) / len(data)
57
58def avgrun(data): # Make small adjustments to a running mean
59 m = data[0]

Callers

nothing calls this directly

Calls 2

FClass · 0.70
sumFunction · 0.50

Tested by

no test coverage detected