hex.sub.sub_hex_shifted_constant (arity 4)

Wrapper around the 5-arity sub_hex_shifted_constant: derives n_const = (#const + 3) / 4 automatically so the caller doesn’t have to compute the constant’s nibble length.

n_const is the minimal hex.vec size needed to store const.

Signature

def sub_hex_shifted_constant n, dst, const, hex_shift { ... }

Defined in hex/math.fj — lines 196–198 (view on GitHub).

Complexity

  • Time: n_const(4@+12) + 5@+2

  • Space: n_const(2.5@+39) + (dst_n - hex_shift)(1.5@+13) + 4@+29

See the complexity glossary for what @, w, dw, dbit, n mean.

Source

Depends on

Used by

Example uses


← Previous: hex.sub.sub_constant_with_leading_zeros Next: hex.sub.sub_hex_shifted_constant/5