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 Struct

Constants

Private Struct
std.math.big.int.Constants
const Constants = struct

Comptime-computed constants for supported bases (2 - 36) all values are set to 0 for bases 0 - 1, to make it possible to access a constant for a given base b using constants.value[b]

Fields

big_bases: [37]Limb

big_bases[b] is the biggest power of b that fit in a single Limb i.e. big_bases[b] = b^k < 2^@bitSizeOf(Limb) and b^(k+1) >= 2^@bitSizeOf(Limb)

digits_per_limb: [37]u8

digits_per_limb[b] is the value of k used in the previous field

File

math/big/int.zig:23
23
24
25
26
27
28
29
const Constants = struct {
    // big_bases[b] is the biggest power of b that fit in a single Limb
    // i.e. big_bases[b] = b^k < 2^@bitSizeOf(Limb) and b^(k+1) >= 2^@bitSizeOf(Limb)
    big_bases: [37]Limb,
    // digits_per_limb[b] is the value of k used in the previous field
    digits_per_limb: [37]u8,
}