MCPcopy Create free account
hub / github.com/BitVM/BitVM / test_bn254_fq2_div3

Function test_bn254_fq2_div3

bitvm/src/bn254/fq2.rs:510–528  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

508
509 #[test]
510 fn test_bn254_fq2_div3() {
511 println!("Fq2.div3: {} bytes", Fq2::div3().len());
512 let mut prng = ChaCha20Rng::seed_from_u64(0);
513
514 for _ in 0..1 {
515 let a = ark_bn254::Fq2::rand(&mut prng);
516 let b = a.double();
517 let c = a.add(b);
518
519 let script = script! {
520 { Fq2::push(c) }
521 { Fq2::div3() }
522 { Fq2::push(a) }
523 { Fq2::equalverify() }
524 OP_TRUE
525 };
526 run(script);
527 }
528 }
529
530 #[test]
531 fn test_bn254_fq2_hinted_mul() {

Callers

nothing calls this directly

Calls 3

runFunction · 0.85
doubleMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected