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

Function u4_lshift_stack

bitvm/src/u4/u4_shift_stack.rs:48–51  ·  view source on GitHub ↗

Calculates n'th left shift of the top u4 element with both tables

(stack: &mut StackTracker, tables: StackVariable, n: u32)

Source from the content-addressed store, hash-verified

46
47/// Calculates n'th left shift of the top u4 element with both tables
48pub fn u4_lshift_stack(stack: &mut StackTracker, tables: StackVariable, n: u32) -> StackVariable {
49 assert!((1..4).contains(&n));
50 stack.get_value_from_table(tables, Some(16 * 3 + 16 * (n - 1)))
51}
52
53/// Table for multiplication by two
54pub fn u4_push_shift_for_blake(stack: &mut StackTracker) -> StackVariable {

Callers 3

u4_2_nib_shift_stackFunction · 0.85
test_lshiftFunction · 0.85
calculate_s_nibFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_lshiftFunction · 0.68