MCPcopy Index your code
hub / github.com/nodejs/node / GeometricMean

Function GeometricMean

deps/v8/tools/run_perf.py:167–173  ·  view source on GitHub ↗

Returns the geometric mean of a list of values. The mean is calculated using log to avoid overflow.

(values)

Source from the content-addressed store, hash-verified

165
166
167def GeometricMean(values):
168 """Returns the geometric mean of a list of values.
169
170 The mean is calculated using log to avoid overflow.
171 """
172 values = list(map(float, values))
173 return math.exp(sum(map(math.log, values)) / len(values))
174
175
176class ResultTracker(object):

Callers 1

ConsumeOutputMethod · 0.70

Calls 3

listFunction · 0.50
mapFunction · 0.50
sumFunction · 0.50

Tested by

no test coverage detected