time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

commit 1f4eb1fec4ac4fa3f9fc9aa4518238e76de2a583
parent fa0065c96e4f5310987300787b666030e26046b0
Author: NunoSempere <nuno.sempere@protonmail.com>
Date:   Fri, 16 Feb 2024 13:43:55 +0100

wrangle mixture weights in go

Diffstat:
Mgo/squiggle.go | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/go/squiggle.go b/go/squiggle.go @@ -51,7 +51,7 @@ type func64 func() float64 func sample_mixture(fs []func64, weights []float64) float64 { var sum_weights float64 = 0 - for i_, weight := range weights { + for _, weight := range weights { sum_weights += weight } return sum_weights