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

Method add

bitvm/src/bn254/fq2.rs:94–103  ·  view source on GitHub ↗
(mut a: u32, mut b: u32)

Source from the content-addressed store, hash-verified

92 }
93
94 pub fn add(mut a: u32, mut b: u32) -> Script {
95 if a < b {
96 (a, b) = (b, a);
97 }
98
99 script! {
100 { Fq::add(a + 1, b + 1) }
101 { Fq::add(a, b + 1) }
102 }
103 }
104
105 pub fn sub(a: u32, b: u32) -> Script {
106 if a > b {

Callers 12

test_addFunction · 0.45
test_subFunction · 0.45
test_doubleFunction · 0.45
test_div3Function · 0.45
test_addFunction · 0.45
test_subFunction · 0.45
test_doubleFunction · 0.45
test_div3Function · 0.45
test_hinted_mul_lc2Function · 0.45
test_bn254_fq2_tripleFunction · 0.45
test_bn254_fq2_div3Function · 0.45

Calls

no outgoing calls

Tested by 12

test_addFunction · 0.36
test_subFunction · 0.36
test_doubleFunction · 0.36
test_div3Function · 0.36
test_addFunction · 0.36
test_subFunction · 0.36
test_doubleFunction · 0.36
test_div3Function · 0.36
test_hinted_mul_lc2Function · 0.36
test_bn254_fq2_tripleFunction · 0.36
test_bn254_fq2_div3Function · 0.36