summaryrefslogtreecommitdiff
path: root/bench/stats.py
blob: 8e500e84a1cd2033cf17abb5e81841eb1ef9ac5d (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env python3

import sys
import statistics

values = [ float(x) for x in sys.stdin.readlines()]

print("mean = %.4f, median = %.4f, stdev = %.4f, variance = %.4f" %
    (statistics.mean(values), statistics.median(values),
      statistics.stdev(values), statistics.variance(values)))