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)
()
| 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) |
| 21 | pub 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 |
| 36 | pub fn u4_drop_quotient_table() -> Script { |
no outgoing calls
no test coverage detected