From 51c3d93a67d22b158af0ebff4623a7b7f55c9ecc Mon Sep 17 00:00:00 2001 From: Agnes Leroy Date: Fri, 28 Jan 2022 13:53:02 +0100 Subject: [PATCH] fix(concrete_npe): fix base log in the pbs noise --- concrete-npe/src/operators.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/concrete-npe/src/operators.rs b/concrete-npe/src/operators.rs index 7638b7b681..733832fc44 100644 --- a/concrete-npe/src/operators.rs +++ b/concrete-npe/src/operators.rs @@ -527,6 +527,7 @@ where Variance(res) } + /// Computes the dispersion of the bits greater than $q$ after a modulus switching. /// # Example /// ```rust @@ -709,7 +710,7 @@ where { let n = lwe_mask_size.0 as f64; let k = rlwe_mask_size.0 as f64; - let b = base_log.0 as f64; + let b = (1 << base_log.0) as f64; let l = level.0 as f64; let b2l = f64::powf(b, 2. * l) as f64; let big_n = poly_size.0 as f64;