Skip to content

Commit

Permalink
small code optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
PayneJoe committed Jul 9, 2024
1 parent 64eed07 commit 0ffa520
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/prover/src/core/circle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,12 @@ impl CirclePoint<SecureField> {

pub fn get_random_point<C: Channel>(channel: &mut C) -> Self {
let t = channel.draw_felt();
let t_square = t.square();

let one_plus_tsquared_inv = t.square().add(SecureField::one()).inverse();
let one_plus_tsquared_inv = t_square.add(SecureField::one()).inverse();

let x = SecureField::one()
.add(t.square().neg())
.add(t_square.neg())
.mul(one_plus_tsquared_inv);
let y = t.double().mul(one_plus_tsquared_inv);

Expand Down

0 comments on commit 0ffa520

Please sign in to comment.