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

Function u4_push_quotient_table_5

bitvm/src/u4/u4_add.rs:21–33  ·  view source on GitHub ↗

Pushes the table for calculating the quotient, i.e. floor(x / 16) for x < 80. i.e. 15 (max u4) * 5 (max # numbers to sum) + 4 (max carry)

()

Source from the content-addressed store, hash-verified

19
20/// Pushes the table for calculating the quotient, i.e. floor(x / 16) for x < 80. i.e. 15 (max u4) * 5 (max # numbers to sum) + 4 (max carry)
21pub fn u4_push_quotient_table_5() -> Script {
22 script! {
23 for i in (0..=4).rev() {
24 { i }
25 OP_DUP
26 OP_2DUP
27 OP_3DUP
28 OP_3DUP
29 OP_3DUP
30 OP_3DUP
31 }
32 }
33}
34
35/// Drop quotient table
36pub fn u4_drop_quotient_table() -> Script {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected