Zig 0.17.0-dev (Split by item)

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 library itself.

mulShift64

float.mulShift64
fn mulShift64(m: u64, mul: *const [2]u64, j: u32) u64

File

lib/std/fmt/float.zig:677

Code

fn mulShift64(m: u64, mul: *const [2]u64, j: u32) u64 {
    std.debug.assert(j > 64);
    const b0 = @as(u128, m) * mul[0];
    const b2 = @as(u128, m) * mul[1];

    if (j < 128) {
        const shift: u6 = @intCast(j - 64);
        return @intCast(((b0 >> 64) + b2) >> shift);
    } else {
        return 0;
    }
}