()
| 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() { |