From eb2c255de2ef7e5bbe92dc0be0ecdb07a1d2205e Mon Sep 17 00:00:00 2001 From: skaunov Date: Thu, 8 Feb 2024 04:54:46 +0300 Subject: [PATCH 1/3] Fix visibility of `get_limbs_representations` (Also additional tiny style fix.) --- src/fields/emulated_fp/allocated_field_var.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/fields/emulated_fp/allocated_field_var.rs b/src/fields/emulated_fp/allocated_field_var.rs index 6905fe37..34825329 100644 --- a/src/fields/emulated_fp/allocated_field_var.rs +++ b/src/fields/emulated_fp/allocated_field_var.rs @@ -302,10 +302,10 @@ impl AllocatedEmulatedFpVar R1CSResult> { @@ -464,7 +464,7 @@ impl AllocatedEmulatedFpVar::Constant(*limb)); } - let p_gadget = AllocatedEmulatedFpVar:: { + let p_gadget = Self { cs: self.cs(), limbs: p_gadget_limbs, num_of_additions_over_normal_form: BaseF::one(), @@ -621,10 +621,10 @@ impl AllocatedEmulatedFpVar>( cs: impl Into>, f: impl FnOnce() -> Result, From 78c4820d5ef64ffe3a3ae18d8acc9e04d5520ad0 Mon Sep 17 00:00:00 2001 From: skaunov Date: Fri, 9 Feb 2024 23:25:52 +0300 Subject: [PATCH 2/3] Visibility doc update, tiny style fixes --- src/fields/emulated_fp/allocated_field_var.rs | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/fields/emulated_fp/allocated_field_var.rs b/src/fields/emulated_fp/allocated_field_var.rs index 34825329..a717ba07 100644 --- a/src/fields/emulated_fp/allocated_field_var.rs +++ b/src/fields/emulated_fp/allocated_field_var.rs @@ -303,9 +303,9 @@ impl AllocatedEmulatedFpVar R1CSResult> { @@ -453,11 +453,10 @@ impl AllocatedEmulatedFpVar::get_limbs_representations_from_big_integer( - &::MODULUS, - self.get_optimization_type(), - )?; + let p_representations = Self::get_limbs_representations_from_big_integer( + &::MODULUS, + self.get_optimization_type(), + )?; let p_bigint = limbs_to_bigint(params.bits_per_limb, &p_representations); let mut p_gadget_limbs = Vec::new(); @@ -474,8 +473,8 @@ impl AllocatedEmulatedFpVar::new_witness(ns!(cs, "k"), || { From ae57a7882b4917413cf55e51fc22b8ef1fc5861e Mon Sep 17 00:00:00 2001 From: Pratyush Mishra Date: Mon, 18 Mar 2024 22:21:43 -0700 Subject: [PATCH 3/3] Update src/fields/emulated_fp/allocated_field_var.rs --- src/fields/emulated_fp/allocated_field_var.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fields/emulated_fp/allocated_field_var.rs b/src/fields/emulated_fp/allocated_field_var.rs index a717ba07..e4721634 100644 --- a/src/fields/emulated_fp/allocated_field_var.rs +++ b/src/fields/emulated_fp/allocated_field_var.rs @@ -303,7 +303,7 @@ impl AllocatedEmulatedFpVar