跳转到内容
标准库Zig 0.17.0官方原文
源码std/math/big.zig

第 1 行

std.math.big.assert

别名

第 2 行

别名目标 std.debug.assert

std.math.big.DoubleLimb

常量

第 8 行

std.math.big.HalfLimb

常量

第 9 行

std.math.big.int

别名

第 4 行

别名目标 std.math.big.int

std.math.big.Limb

类型

第 5 行

std.math.big.limb_info

常量

第 6 行

std.math.big.Log2Limb

类型

第 11 行

std.math.big.SignedDoubleLimb

常量

第 10 行

std.math.big.SignedLimb

常量

第 7 行

std.math.big.std

别名

第 1 行

别名目标 std

源码

std/math/big.zig

const std = @import("../std.zig");
const assert = std.debug.assert;

pub const int = @import("big/int.zig");
pub const Limb = usize;
const limb_info = @typeInfo(Limb).int;
pub const SignedLimb = @Int(.signed, limb_info.bits);
pub const DoubleLimb = @Int(.unsigned, 2 * limb_info.bits);
pub const HalfLimb = @Int(.unsigned, limb_info.bits / 2);
pub const SignedDoubleLimb = @Int(.signed, 2 * limb_info.bits);
pub const Log2Limb = std.math.Log2Int(Limb);

comptime {
    assert(std.math.floorPowerOfTwo(usize, limb_info.bits) == limb_info.bits);
    assert(limb_info.signedness == .unsigned);
}

test {
    _ = int;
    _ = Limb;
    _ = SignedLimb;
    _ = DoubleLimb;
    _ = SignedDoubleLimb;
    _ = Log2Limb;
}