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. Private Constant

constants

Private Constant
std.math.big.int.constants
const constants: Constants = blk:

File

math/big/int.zig:30
30
31
32
33
34
35
36
37
38
39
const constants: Constants = blk: {
    @setEvalBranchQuota(2000);
    var digits_per_limb: [37]u8 = @splat(0);
    var bases: [37]Limb = @splat(0);
    for (2..37) |base| {
        digits_per_limb[base] = @intCast(math.log(Limb, base, math.maxInt(Limb)));
        bases[base] = std.math.pow(Limb, base, digits_per_limb[base]);
    }
    break :blk Constants{ .big_bases = bases, .digits_per_limb = digits_per_limb };
}