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

Function test_bn254_fq2_double

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

Source from the content-addressed store, hash-verified

447
448 #[test]
449 fn test_bn254_fq2_double() {
450 println!("Fq2.double: {} bytes", Fq2::double(0).len());
451 let mut prng = ChaCha20Rng::seed_from_u64(0);
452
453 for _ in 0..50 {
454 let a = ark_bn254::Fq2::rand(&mut prng);
455 let c = a.double();
456
457 let script = script! {
458 { Fq2::push(a) }
459 { Fq2::double(0) }
460 { Fq2::push(c) }
461 { Fq2::equalverify() }
462 OP_TRUE
463 };
464 run(script);
465 }
466 }
467
468 #[test]
469 fn test_bn254_fq2_triple() {

Callers

nothing calls this directly

Calls 2

runFunction · 0.85
doubleMethod · 0.45

Tested by

no test coverage detected