Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Public Function

shiftLeft

Public Function
std.math.big.int.Mutable.shiftLeft
pub fn shiftLeft(r: *Mutable, a: Const, shift: usize) void

r = a << shift, in other words, r = a * 2^shift

r and a may alias.

Asserts there is enough memory to fit the result. The upper bound Limb count is a.limbs.len + (shift / (@sizeOf(Limb) * 8)).

Params

File

math/big/int.zig:1310
1310
1311
1312
1313
1314
    pub fn shiftLeft(r: *Mutable, a: Const, shift: usize) void {
        const new_len = llshl(r.limbs, a.limbs, shift);
        r.normalize(new_len);
        r.positive = a.positive;
    }