Skip to content

Instantly share code, notes, and snippets.

@wangshouh
Created April 27, 2025 17:36
Show Gist options
  • Save wangshouh/1c1596ad61f6fee21e58b21882844f74 to your computer and use it in GitHub Desktop.
Save wangshouh/1c1596ad61f6fee21e58b21882844f74 to your computer and use it in GitHub Desktop.
use ark_ff::{Fp64, MontBackend, fields::MontConfig};
use ark_poly::{DenseUVPolynomial, Polynomial, univariate::DensePolynomial};
#[derive(MontConfig)]
#[modulus = "11"]
#[generator = "1"]
pub struct FqConfig;
pub type Fq = Fp64<MontBackend<FqConfig, 1>>;
fn main() {
let poly: DensePolynomial<Fq> =
DenseUVPolynomial::from_coefficients_vec(vec![Fq::from(2), Fq::from(1), Fq::from(0)]);
let v: Vec<Fq> = (0..11).map(|i| poly.evaluate(&Fq::from(i))).collect();
println!("{:?}", v)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment