Pushes the table for calculating the modulo, i.e. x % 16 for x < 48. i.e. 15 (max u4) * 3 (max # numbers to sum) + 2 (max carry)
(stack: &mut StackTracker)
| 15 | |
| 16 | /// Pushes the table for calculating the modulo, i.e. x % 16 for x < 48. i.e. 15 (max u4) * 3 (max # numbers to sum) + 2 (max carry) |
| 17 | pub fn u4_push_modulo_for_blake(stack: &mut StackTracker) -> StackVariable { |
| 18 | stack.custom( |
| 19 | script! { |
| 20 | for i in (0..48).rev() { |
| 21 | { i % 16 } |
| 22 | } |
| 23 | }, |
| 24 | 0, |
| 25 | false, |
| 26 | 0, |
| 27 | "", |
| 28 | ); |
| 29 | stack.define(48, "modulo") |
| 30 | } |
| 31 | |
| 32 | /// Pushes the table for calculating the quotient, i.e. floor(x / 16) for x < 48. i.e. 15 (max u4) * 3 (max # numbers to sum) + 2 (max carry) |
| 33 | pub fn u4_push_quotient_for_blake(stack: &mut StackTracker) -> StackVariable { |
no outgoing calls