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

Method sub

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

Source from the content-addressed store, hash-verified

103 }
104
105 pub fn sub(a: u32, b: u32) -> Script {
106 if a > b {
107 script! {
108 { Fq::sub(a + 1, b + 1) }
109 { Fq::sub(a, b + 1) }
110 }
111 } else {
112 script! {
113 { Fq::sub(a + 1, b + 1) }
114 { Fq::sub(a + 1, b) }
115 }
116 }
117 }
118
119 pub fn double(a: u32) -> Script {
120 script! {

Callers 4

test_subFunction · 0.45
test_doubleFunction · 0.45
test_subFunction · 0.45
test_doubleFunction · 0.45

Calls

no outgoing calls

Tested by 4

test_subFunction · 0.36
test_doubleFunction · 0.36
test_subFunction · 0.36
test_doubleFunction · 0.36