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

Function u4_push_from_depth_full_lookup

bitvm/src/u4/u4_logic_stack.rs:51–58  ·  view source on GitHub ↗

Pushes table for the value x * 16

(stack: &mut StackTracker, delta: i32)

Source from the content-addressed store, hash-verified

49
50/// Pushes table for the value x * 16
51pub fn u4_push_from_depth_full_lookup(stack: &mut StackTracker, delta: i32) -> StackVariable {
52 for i in (0..16).rev() {
53 stack.numberi((i + 1) * -16 + delta);
54 }
55 let lookup = stack.join_count(&mut stack.get_var_from_stack(15), 15);
56 stack.rename(lookup, "lookup");
57 lookup
58}
59
60/// Pushes the table to calculate the order of ordered pairs (a, b) satisfying the conditions a <= b and 0 <= a, b < 16
61pub fn u4_push_from_depth_half_lookup(stack: &mut StackTracker, delta: i32) -> StackVariable {

Callers 1

newMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected