Siwtch back to float64

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
Jakub Sztandera 2020-06-27 01:12:43 +02:00
parent 49ddcdb4b0
commit e5a7cb635c
No known key found for this signature in database
GPG Key ID: 9A9AF56F8B3879BA

View File

@ -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 {