From 8a085efeeadf82f9215582daa319dc79caec494f Mon Sep 17 00:00:00 2001 From: Jean-Philippe Bossuat Date: Fri, 13 Oct 2023 16:36:19 +0200 Subject: [PATCH] [ring]: small code improvement --- ring/sampler_gaussian.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ring/sampler_gaussian.go b/ring/sampler_gaussian.go index efc8514a..fdc15c7b 100644 --- a/ring/sampler_gaussian.go +++ b/ring/sampler_gaussian.go @@ -149,7 +149,7 @@ func (g *GaussianSampler) read(pol Poly, f func(a, b, c uint64) uint64) { norm, sign = g.normFloat64() if v := norm * sigma; v <= bound { - coeffInt = uint64(norm*sigma + 0.5) + coeffInt = uint64(v + 0.5) // rounding break } }