Skip to content

Commit

Permalink
fix(unipoly): fix two tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gy001 committed Jan 6, 2025
1 parent 902550a commit 418d7a5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions poly-commit-rs/src/libraries/unipolynomial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -547,10 +547,10 @@ mod tests {

// Expected subproduct tree
let expected_tree = SubproductTree {
poly: vec![1, -10, 35, -50, 24], // (x - 1)(x - 2)(x - 3)(x - 4)
poly: vec![24, -50, 35, -10, 1], // (x - 1)(x - 2)(x - 3)(x - 4)
children: Some(Box::new((
SubproductTree {
poly: vec![1, -3, 2], // (x - 1)(x - 2)
poly: vec![2, -3, 1], // (x - 1)(x - 2)
children: Some(Box::new((
SubproductTree {
poly: vec![-1, 1], // x - 1
Expand All @@ -563,7 +563,7 @@ mod tests {
))),
},
SubproductTree {
poly: vec![1, -7, 12], // (x - 3)(x - 4)
poly: vec![12, -7, 1], // (x - 3)(x - 4)
children: Some(Box::new((
SubproductTree {
poly: vec![-3, 1], // x - 3
Expand All @@ -586,7 +586,7 @@ mod tests {
// Input domain and polynomial
let domain = vec![1, 2, 3, 4];
let tree = UniPolynomial::construct_subproduct_tree(&domain);
let poly = vec![1, 0, -1]; // x^2 - 1
let poly = vec![-1, 0, 1]; // x^2 - 1

// Compute evaluations
let evals = UniPolynomial::compute_eval_fix(&tree, &poly, &domain);
Expand Down

0 comments on commit 418d7a5

Please sign in to comment.