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

Function test_bn254_fq2_div2

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

Source from the content-addressed store, hash-verified

488
489 #[test]
490 fn test_bn254_fq2_div2() {
491 println!("Fq2.div2: {} bytes", Fq2::div2().len());
492 let mut prng = ChaCha20Rng::seed_from_u64(0);
493
494 for _ in 0..1 {
495 let a = ark_bn254::Fq2::rand(&mut prng);
496 let b = a.double();
497
498 let script = script! {
499 { Fq2::push(b) }
500 { Fq2::div2() }
501 { Fq2::push(a) }
502 { Fq2::equalverify() }
503 OP_TRUE
504 };
505 run(script);
506 }
507 }
508
509 #[test]
510 fn test_bn254_fq2_div3() {

Callers

nothing calls this directly

Calls 2

runFunction · 0.85
doubleMethod · 0.45

Tested by

no test coverage detected