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

Method add

bitvm/src/bn254/fq6.rs:92–101  ·  view source on GitHub ↗
(mut a: u32, mut b: u32)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected