From e5a7cb635c3f3c91a6961ff00bc82abb4d33fc9f Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Sat, 27 Jun 2020 01:12:43 +0200 Subject: [PATCH] Siwtch back to float64 Signed-off-by: Jakub Sztandera --- cmd/lotus-bench/import.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/lotus-bench/import.go b/cmd/lotus-bench/import.go index 4f1f87c4f..76c05135b 100644 --- a/cmd/lotus-bench/import.go +++ b/cmd/lotus-bench/import.go @@ -211,22 +211,22 @@ func countGasCosts(et *types.ExecutionTrace) (int64, int64) { return cgas, vgas } -func compStats(vals []float32) (float32, float32) { - var sum float32 +func compStats(vals []float64) (float64, float64) { + var sum float64 for _, v := range vals { sum += v } - av := sum / float32(len(vals)) + av := sum / float64(len(vals)) - var varsum float32 + var varsum float64 for _, v := range vals { delta := av - v varsum += delta * delta } - return av, float32(math.Sqrt(float64(varsum / float32(len(vals))))) + return av, float64(math.Sqrt(float64(varsum / float64(len(vals))))) } type stats struct {