mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-05 23:33:07 +00:00
fix
This commit is contained in:
parent
4668e8c5f8
commit
3bc1e65a7a
@ -303,7 +303,7 @@ impl GoldilocksField {
|
||||
} else if self.is_quadratic_residue() {
|
||||
let t = (Self::order() - BigUint::from(1u32))
|
||||
/ (BigUint::from(2u32).pow(Self::TWO_ADICITY as u32));
|
||||
let mut z = Self::POWER_OF_TWO_GENERATOR.exp_biguint(&t);
|
||||
let mut z = Self::MULTIPLICATIVE_GROUP_GENERATOR.exp_biguint(&t);
|
||||
let mut w = self.exp_biguint(&((t - BigUint::from(1u32)) / BigUint::from(2u32)));
|
||||
let mut x = w * *self;
|
||||
let mut b = x * w;
|
||||
|
||||
@ -30,7 +30,9 @@ impl SimpleGenerator<GoldilocksField> for SquareRootGenerator<GoldilocksField, 2
|
||||
out_buffer: &mut GeneratedValues<GoldilocksField>,
|
||||
) {
|
||||
let x_squared = witness.get_target(self.x_squared);
|
||||
dbg!(x_squared);
|
||||
let x = x_squared.sqrt().unwrap();
|
||||
dbg!(x);
|
||||
|
||||
out_buffer.set_target(self.x, x);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user